RESOLVED FIXED 33523
[V8] Support injection of inspector scripts into the inspected context
https://bugs.webkit.org/show_bug.cgi?id=33523
Summary [V8] Support injection of inspector scripts into the inspected context
Yury Semikhatsky
Reported 2010-01-12 00:29:26 PST
Part of Web Inspector is implemented in JavaScript and needs direct access to the inspected JS objects. To facilitate this there should be a way to compile the inspector utilities(called injected script) in the global scope of the inspected ScriptState and somehow store a reference to it(we need to keep the reference since the injected script keeps some state related to the inspected DOM, CSS styles and JS objects).
Attachments
patch (5.53 KB, patch)
2010-01-12 00:46 PST, Yury Semikhatsky
no flags
patch (5.46 KB, patch)
2010-01-12 01:23 PST, Yury Semikhatsky
pfeldman: review+
Yury Semikhatsky
Comment 1 2010-01-12 00:46:12 PST
WebKit Review Bot
Comment 2 2010-01-12 00:50:11 PST
Yury Semikhatsky
Comment 3 2010-01-12 01:23:46 PST
Pavel Feldman
Comment 4 2010-01-12 01:53:28 PST
Comment on attachment 46349 [details] patch > + // Create a weak reference to the v8 wrapper of InspectorBackend to deref > + // InspectorBackend when the wrapper is garbage collected. InspectorBackend? > + // Call custom code to create inspector backend wrapper in the utility context inspector backend wrapper ? > + ASSERT(!v.IsEmpty()); > + ASSERT(v->IsFunction()); > + So this script source should evaluate into function? Could you on comment why it is so? Otherwise looks good.
Yury Semikhatsky
Comment 5 2010-01-12 02:50:06 PST
(In reply to comment #4) > (From update of attachment 46349 [details]) > > + // Create a weak reference to the v8 wrapper of InspectorBackend to deref > > + // InspectorBackend when the wrapper is garbage collected. > > InspectorBackend? > Done. Changed to InjectedScriptHost. > > + // Call custom code to create inspector backend wrapper in the utility context > > inspector backend wrapper ? > Fixed. > > + ASSERT(!v.IsEmpty()); > > + ASSERT(v->IsFunction()); > > + > > So this script source should evaluate into function? Could you on comment why > it is so? > Done.
Yury Semikhatsky
Comment 6 2010-01-12 04:42:17 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp Committed r53135
Note You need to log in before you can comment on or make changes to this bug.