mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
remove temporary logging and make test for bug 550026 consistent with m-c
This commit is contained in:
parent
acc5397046
commit
0df3a5c47c
@ -355,8 +355,6 @@ PluginModuleChild::DetectNestedEventLoop(gpointer data)
|
||||
"not canceled before returning to main event loop!");
|
||||
|
||||
PLUGIN_LOG_DEBUG(("Detected nested glib event loop"));
|
||||
fprintf(stderr, "Detected nested glib event loop\n");
|
||||
fflush(stderr);
|
||||
|
||||
// just detected a nested loop; start a timer that will
|
||||
// periodically rpc-call back into the browser and process some
|
||||
@ -380,9 +378,6 @@ PluginModuleChild::ProcessBrowserEvents(gpointer data)
|
||||
NS_ABORT_IF_FALSE(pmc->mTopLoopDepth < g_main_depth(),
|
||||
"not canceled before returning to main event loop!");
|
||||
|
||||
fprintf(stderr, "Time to process browser events\n");
|
||||
fflush(stderr);
|
||||
|
||||
pmc->CallProcessSomeEvents();
|
||||
|
||||
return TRUE;
|
||||
|
@ -771,8 +771,6 @@ bool
|
||||
PluginModuleParent::AnswerProcessSomeEvents()
|
||||
{
|
||||
PLUGIN_LOG_DEBUG(("Spinning mini nested loop ..."));
|
||||
fprintf(stderr, "Spinning mini nested loop ...\n");
|
||||
fflush(stderr);
|
||||
|
||||
int i = 0;
|
||||
for (; i < kMaxChancesToProcessEvents; ++i)
|
||||
@ -780,8 +778,6 @@ PluginModuleParent::AnswerProcessSomeEvents()
|
||||
break;
|
||||
|
||||
PLUGIN_LOG_DEBUG(("... quitting mini nested loop; processed %i tasks", i));
|
||||
fprintf(stderr, "... quitting mini nested loop; processed %i tasks\n", i);
|
||||
fflush(stderr);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -89,9 +89,11 @@ NoteIntentionalCrash()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
IntentionalCrash()
|
||||
{
|
||||
NoteIntentionalCrash();
|
||||
|
||||
int *pi = NULL;
|
||||
*pi = 55; // Crash dereferencing null pointer
|
||||
++gCrashCount;
|
||||
@ -157,8 +159,8 @@ static bool hangPlugin(NPObject* npobj, const NPVariant* args, uint32_t argCount
|
||||
static bool getClipboardText(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
|
||||
static bool callOnDestroy(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
|
||||
static bool reinitWidget(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
|
||||
static bool propertyAndMethod(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
|
||||
static bool crashPluginInNestedLoop(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
|
||||
static bool propertyAndMethod(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
|
||||
|
||||
static const NPUTF8* sPluginMethodIdentifierNames[] = {
|
||||
"npnEvaluateTest",
|
||||
@ -201,8 +203,8 @@ static const NPUTF8* sPluginMethodIdentifierNames[] = {
|
||||
"getClipboardText",
|
||||
"callOnDestroy",
|
||||
"reinitWidget",
|
||||
"propertyAndMethod",
|
||||
"crashInNestedLoop",
|
||||
"propertyAndMethod"
|
||||
};
|
||||
static NPIdentifier sPluginMethodIdentifiers[ARRAY_LENGTH(sPluginMethodIdentifierNames)];
|
||||
static const ScriptableFunction sPluginMethodFunctions[] = {
|
||||
@ -246,8 +248,8 @@ static const ScriptableFunction sPluginMethodFunctions[] = {
|
||||
getClipboardText,
|
||||
callOnDestroy,
|
||||
reinitWidget,
|
||||
propertyAndMethod,
|
||||
crashPluginInNestedLoop,
|
||||
propertyAndMethod
|
||||
};
|
||||
|
||||
STATIC_ASSERT(ARRAY_LENGTH(sPluginMethodIdentifierNames) ==
|
||||
@ -769,7 +771,6 @@ NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char*
|
||||
instanceData->npnNewStream = true;
|
||||
}
|
||||
if (strcmp(argn[i], "newcrash") == 0) {
|
||||
NoteIntentionalCrash();
|
||||
IntentionalCrash();
|
||||
}
|
||||
}
|
||||
@ -849,14 +850,11 @@ NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char*
|
||||
NPError
|
||||
NPP_Destroy(NPP instance, NPSavedData** save)
|
||||
{
|
||||
printf("NPP_Destroy\n");
|
||||
InstanceData* instanceData = (InstanceData*)(instance->pdata);
|
||||
fprintf(stderr, "NPP_Destroy. instanceData = %p\n", instanceData);
|
||||
fflush(stderr);
|
||||
|
||||
if (instanceData->crashOnDestroy) {
|
||||
NoteIntentionalCrash();
|
||||
if (instanceData->crashOnDestroy)
|
||||
IntentionalCrash();
|
||||
}
|
||||
|
||||
if (instanceData->callOnDestroy) {
|
||||
NPVariant result;
|
||||
@ -2236,7 +2234,6 @@ streamTest(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant*
|
||||
static bool
|
||||
crashPlugin(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result)
|
||||
{
|
||||
NoteIntentionalCrash();
|
||||
IntentionalCrash();
|
||||
VOID_TO_NPVARIANT(*result);
|
||||
return true;
|
||||
|
@ -128,6 +128,5 @@ typedef struct InstanceData {
|
||||
void notifyDidPaint(InstanceData* instanceData);
|
||||
|
||||
void NoteIntentionalCrash();
|
||||
void IntentionalCrash();
|
||||
|
||||
#endif // nptest_h_
|
||||
|
@ -690,8 +690,6 @@ pluginCrashInNestedLoop(InstanceData* instanceData)
|
||||
// we'll be crashing soon, note that fact now to avoid messing with
|
||||
// timing too much
|
||||
NoteIntentionalCrash();
|
||||
fprintf(stderr, "Begin crash sequence. instanceData = %p\n", instanceData);
|
||||
fflush(stderr);
|
||||
|
||||
// schedule the crasher thread ...
|
||||
pthread_t crasherThread;
|
||||
|
Loading…
Reference in New Issue
Block a user