Bug 102631 - Web Inspector: [JSC] some functions of "InjectedScriptSource.js" work wrong when injected for worker inspector
Summary: Web Inspector: [JSC] some functions of "InjectedScriptSource.js" work wrong w...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-18 18:30 PST by Peter Wang
Modified: 2014-12-12 13:42 PST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Wang 2012-11-18 18:30:48 PST
When we inject "InjectedScriptSource.js" into JS world, we must provide three arguments (InjectedScriptHost, inspectedWindow, and injectedScriptId), which are also living in the same world

Since JSC worker has totally isolated world with the world for JSWindowShell, we cannot create "inspectedWindow" in the worker world as "InjectedScriptHost" and "injectedScriptId". So the "inspectedWindow" related functions will throw exceptions when are invoked.

I really cannot figure out a good way to resolve it. Should I try to rewrite "InjectedScriptSource.js" for JSC worker? Or just ignore the exceptions? 

How to reproduce the bug:
(1) Open inspector for any web page including worker.
(2) Input some variable name into "Watch Expressions".
(3) Choose "Pause on start", and trigger the worker in the inspected page.  
(4) The worker inspector window shows, and there is a failed assert when worker inspector try to evaluate the variables in "Watch Expressions":

0x00007ffff5b69e77 in WebCore::InjectedScriptBase::makeCall (this=0x7fff86e37d10, function=..., result=0x7fff86e37af0)
    at /home/torch-admin/project/upstream/Source/WebCore/inspector/InjectedScriptBase.cpp:108
108	    ASSERT(!hadException);
(gdb) bt
#0  0x00007ffff5b69e77 in WebCore::InjectedScriptBase::makeCall (this=0x7fff86e37d10, function=..., result=0x7fff86e37af0)
    at /home/torch-admin/project/upstream/Source/WebCore/inspector/InjectedScriptBase.cpp:108
#1  0x00007ffff5b69fea in WebCore::InjectedScriptBase::makeEvalCall (this=0x7fff86e37d10, errorString=0x7fff86e37f10, function=..., 
    objectResult=0x7fff86e37e10, wasThrown=0x7fff86e37f90)
    at /home/torch-admin/project/upstream/Source/WebCore/inspector/InjectedScriptBase.cpp:120
#2  0x00007ffff5b67c21 in WebCore::InjectedScript::evaluateOnCallFrame (this=0x7fff86e37d10, errorString=0x7fff86e37f10, callFrames=
    ..., callFrameId=..., expression=..., objectGroup=..., includeCommandLineAPI=false, returnByValue=false, generatePreview=false, 
    result=0x7fff86e37e10, wasThrown=0x7fff86e37f90)
    at /home/torch-admin/project/upstream/Source/WebCore/inspector/InjectedScript.cpp:96
#3  0x00007ffff5baedb9 in WebCore::InspectorDebuggerAgent::evaluateOnCallFrame (this=0x7fff7801c370, errorString=0x7fff86e37f10, 
    callFrameId=..., expression=..., objectGroup=0x7fff86e37e90, includeCommandLineAPI=0x7fff86e37f99, 
    doNotPauseOnExceptionsAndMuteConsole=0x7fff86e37f9b, returnByValue=0x7fff86e37f9d, generatePreview=0x7fff86e37f9f, result=..., 
    wasThrown=0x7fff86e37f90) at /home/torch-admin/project/upstream/Source/WebCore/inspector/InspectorDebuggerAgent.cpp:518
#4  0x00007ffff6692417 in WebCore::InspectorBackendDispatcherImpl::Debugger_evaluateOnCallFrame (this=0x7fff78023240, callId=36, 
    requestMessageObject=0x7fff78070e20) at generated/InspectorBackendDispatcher.cpp:4485
Comment 1 Brian Burg 2014-12-12 13:40:15 PST
Closing as invalid, as this bug pertains to the old inspector UI and/or its tests.
Please file a new bug (https://www.webkit.org/new-inspector-bug) if the bug/feature/issue is still relevant to WebKit trunk.