WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
86361
Web Inspector: [Extensions API] allow extensions to evaluate in the context of their content scripts
https://bugs.webkit.org/show_bug.cgi?id=86361
Summary
Web Inspector: [Extensions API] allow extensions to evaluate in the context o...
Andrey Kosyakov
Reported
2012-05-14 05:19:04 PDT
This exposes additional options to inspectedWindow.eval() and SidebarPane.setExpression() that allow extensions to specify that evaluation should be performed in the context of the content script of those extensions.
Attachments
Patch
(19.48 KB, patch)
2012-05-14 05:25 PDT
,
Andrey Kosyakov
yurys
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andrey Kosyakov
Comment 1
2012-05-14 05:25:14 PDT
Created
attachment 141700
[details]
Patch
Yury Semikhatsky
Comment 2
2012-05-14 07:27:43 PDT
Comment on
attachment 141700
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=141700&action=review
> Source/WebCore/inspector/front-end/ExtensionAPI.js:419 > + var callback = extractCallbackArgument(arguments);
Can we avoid this and have callback at a fixed position? Probably do it by passing an arguments map as the firs parameter instead of expression string as you suggested?
> Source/WebCore/inspector/front-end/ExtensionServer.js:729 > + * @param {Object} options
Please keep parameter annotations in the same order as the parameters.
> Source/WebCore/inspector/front-end/JavaScriptContextManager.js:208 > + function comparator(securityOrigin, context)
I'd rather use a linear search here.
> Source/WebCore/inspector/front-end/JavaScriptContextManager.js:216 > + return this._isolatedContexts[index];
Pleas add explicit return statement for the case when there is no context matching that security origin.
Andrey Kosyakov
Comment 3
2012-05-14 09:26:44 PDT
Comment on
attachment 141700
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=141700&action=review
>> Source/WebCore/inspector/front-end/ExtensionAPI.js:419 >> + var callback = extractCallbackArgument(arguments); > > Can we avoid this and have callback at a fixed position? Probably do it by passing an arguments map as the firs parameter instead of expression string as you suggested?
As discussed offline -- we'd like expression to appear on its own as it's a mandatory parameter.
>> Source/WebCore/inspector/front-end/ExtensionServer.js:729 >> + * @param {Object} options > > Please keep parameter annotations in the same order as the parameters.
Fixed!
>> Source/WebCore/inspector/front-end/JavaScriptContextManager.js:208 >> + function comparator(securityOrigin, context) > > I'd rather use a linear search here.
Done!
>> Source/WebCore/inspector/front-end/JavaScriptContextManager.js:216 >> + return this._isolatedContexts[index]; > > Pleas add explicit return statement for the case when there is no context matching that security origin.
Done.
Andrey Kosyakov
Comment 4
2012-05-14 09:34:56 PDT
Committed
r116957
: <
http://trac.webkit.org/changeset/116957
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug