Beispiel #1
0
static void reconnectToWorkerContextInspectorTask(ScriptExecutionContext* context, const String& savedState)
{
    ASSERT(context->isWorkerContext());
    WorkerInspectorController* ic = static_cast<WorkerContext*>(context)->workerInspectorController();
    ic->restoreInspectorStateFromCookie(savedState);
    ic->resume();
}
Beispiel #2
0
bool InspectorInstrumentation::hasFrontendForScriptContext(ScriptExecutionContext* scriptExecutionContext)
{
    if (!scriptExecutionContext)
        return false;

#if ENABLE(WORKERS)
    if (scriptExecutionContext->isWorkerContext()) {
        WorkerContext* workerContext = static_cast<WorkerContext*>(scriptExecutionContext);
        WorkerInspectorController* workerInspectorController = workerContext->workerInspectorController();
        return workerInspectorController && workerInspectorController->hasFrontend();
    }
#endif

    ASSERT(scriptExecutionContext->isDocument());
    Document* document = static_cast<Document*>(scriptExecutionContext);
    Page* page = document->page();
    return page && page->inspectorController()->hasFrontend();
}
Beispiel #3
0
static void reconnectToWorkerContextInspectorTask(ExecutionContext* context, const String& savedState)
{
    WorkerInspectorController* ic = toWorkerGlobalScope(context)->workerInspectorController();
    ic->restoreInspectorStateFromCookie(savedState);
    ic->resume();
}