Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Issue 113085: Split V8Proxy::retrieveActiveFrame() into two methods. (Closed)

Created:
11 years, 7 months ago by Aaron Boodman
Modified:
7 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Split V8Proxy::retrieveActiveFrame() into two methods. We now have RetrieveFrameForCurrentContext() and RetrieveFrameForEnteredContext(). These terms means the same thing they do in V8::Context -- 'current' is the top of the js stack and 'entered' is the bottom. I needed 'entered' to fix a bug in extensions where if you call an extension API through the web inspector we get confused and think the web inspector's view is the one who called.

Patch Set 1 #

Patch Set 2 : Remove bogus changes #

Patch Set 3 : Rename and better comments #

Total comments: 12

Patch Set 4 : Darin feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -36 lines) Patch
M chrome/renderer/extensions/bindings_utils.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/renderer/extensions/bindings_utils.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/renderer/extensions/extension_process_bindings.cc View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/renderer/extensions/renderer_extension_bindings.cc View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/renderer/external_extension.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/loadtimes_extension_bindings.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M webkit/glue/devtools/debugger_agent_manager.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M webkit/glue/webdevtoolsclient_impl.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M webkit/glue/webframe.h View 1 2 3 1 chunk +17 lines, -1 line 0 comments Download
M webkit/glue/webframe_impl.cc View 1 2 3 1 chunk +13 lines, -2 lines 0 comments Download
M webkit/port/bindings/v8/JSXPathNSResolver.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M webkit/port/bindings/v8/ScriptController.h View 1 2 1 chunk +7 lines, -7 lines 0 comments Download
M webkit/port/bindings/v8/ScriptController.cpp View 1 2 2 chunks +8 lines, -3 lines 0 comments Download
M webkit/port/bindings/v8/v8_custom.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M webkit/port/bindings/v8/v8_proxy.h View 1 2 3 1 chunk +22 lines, -4 lines 0 comments Download
M webkit/port/bindings/v8/v8_proxy.cpp View 1 2 3 5 chunks +13 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Aaron Boodman
11 years, 7 months ago (2009-05-07 04:52:25 UTC) #1
Aaron Boodman
11 years, 7 months ago (2009-05-07 20:03:35 UTC) #2
Aaron Boodman
I've updated the method names per our offline conversation and added additional comments. Note that ...
11 years, 7 months ago (2009-05-07 20:05:26 UTC) #3
Aaron Boodman
ping I'll coordinate with whoever's doing the deps roll after my upstream change gets landed ...
11 years, 7 months ago (2009-05-09 20:05:30 UTC) #4
darin (slow to review)
LGTM http://codereview.chromium.org/113085/diff/37/40 File chrome/renderer/extensions/extension_process_bindings.cc (right): http://codereview.chromium.org/113085/diff/37/40#newcode72 Line 72: WebFrame* webframe = WebFrame::RetrieveFrameForEnteredContext(); I think it ...
11 years, 7 months ago (2009-05-10 04:13:59 UTC) #5
Aaron Boodman
11 years, 7 months ago (2009-05-11 17:22:33 UTC) #6
fyi

http://codereview.chromium.org/113085/diff/37/40
File chrome/renderer/extensions/extension_process_bindings.cc (right):

http://codereview.chromium.org/113085/diff/37/40#newcode72
Line 72: WebFrame* webframe = WebFrame::RetrieveFrameForEnteredContext();
On 2009/05/10 04:14:00, darin wrote:
> I think it would be very helpful to document why you are using the entered
frame
> but the current renderview.

This was a mistake, thanks for pointing it out. I added a short comment though.

http://codereview.chromium.org/113085/diff/37/41
File chrome/renderer/extensions/renderer_extension_bindings.cc (right):

http://codereview.chromium.org/113085/diff/37/41#newcode52
Line 52: RenderView* renderview = GetRenderViewForCurrentContext();
On 2009/05/10 04:14:00, darin wrote:
> ditto

Done.

http://codereview.chromium.org/113085/diff/37/44
File chrome/test/data/extensions/good/extension2/2/manifest.json (right):

http://codereview.chromium.org/113085/diff/37/44#newcode5
Line 5: "plugins_dir": "npapi"
On 2009/05/10 04:14:00, darin wrote:
> did you mean to include this change in this CL?

No, fixed.

http://codereview.chromium.org/113085/diff/37/47
File webkit/glue/webframe.h (right):

http://codereview.chromium.org/113085/diff/37/47#newcode40
Line 40: // in V8Proxy::retrieveFrameForEnteredContext() for more information.
On 2009/05/10 04:14:00, darin wrote:
> I think you mean retrieveFrameForCurrentContext.
> 
> It is a bit fragile to make Chrome code refer to WebCore code for
documentation.
>  The WebCore code could change radically which could leave these references
> stale.  I think it may be wise to document everything here (even if it is a
bit
> redundant).

Done.

Powered by Google App Engine
This is Rietveld 408576698