Bug 66037

Summary: Pass additional details to client in didCreateIsolatedContext
Product: WebKit Reporter: Aaron Boodman <aa>
Component: WebKit APIAssignee: Aaron Boodman <aa>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, fishd
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch fishd: review+, fishd: commit-queue-

Aaron Boodman
Reported 2011-08-10 23:59:49 PDT
Pass additional details to client in didCreateIsolatedContext
Attachments
Patch (11.83 KB, patch)
2011-08-11 00:01 PDT, Aaron Boodman
no flags
Patch (11.94 KB, patch)
2011-08-11 00:13 PDT, Aaron Boodman
no flags
Patch (11.93 KB, patch)
2011-08-11 12:22 PDT, Aaron Boodman
fishd: review+
fishd: commit-queue-
Aaron Boodman
Comment 1 2011-08-11 00:01:48 PDT
Aaron Boodman
Comment 2 2011-08-11 00:03:41 PDT
We currently have to figure out these details through ugly, and probably unsafe, roundabout ways. Better to just pass them directly.
Adam Barth
Comment 3 2011-08-11 00:05:53 PDT
Comment on attachment 103586 [details] Patch LGTM, but we need to great and powerful fishd.
Gyuyoung Kim
Comment 4 2011-08-11 00:07:15 PDT
Early Warning System Bot
Comment 5 2011-08-11 00:10:31 PDT
Aaron Boodman
Comment 6 2011-08-11 00:13:45 PDT
Aaron Boodman
Comment 7 2011-08-11 00:14:56 PDT
(In reply to comment #3) > LGTM, but we need to great and powerful fishd. I know. I just thought your review would be good for the webcore bit, even though it is small.
Darin Fisher (:fishd, Google)
Comment 8 2011-08-11 11:55:51 PDT
Comment on attachment 103588 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=103588&action=review > Source/WebKit/chromium/public/WebFrameClient.h:44 > +#include "v8/include/v8.h" we often just forward declare V8 types. see WebFrame.h for example. > Source/WebKit/chromium/public/WebFrameClient.h:312 > + virtual void didCreateIsolatedScriptContext(WebFrame*, int isolatedWorldId, v8::Handle<v8::Context>) { } in WebFrame.h, we refer to isolatedWorldId as "worldID" I assume both of these integers refer to the same thing, so probably would be good to use the same exact variable name for these. > Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:85 > +#if WEBKIT_USING_V8 though it really doesn't matter that much, you might go with USE(V8) to match what you do below. since this file is implementing a WebCore interface, and the WebCore interface uses USE(V8), perhaps this file should do the same? There are just nits, so R=me.
Aaron Boodman
Comment 9 2011-08-11 12:21:58 PDT
(In reply to comment #8) > (From update of attachment 103588 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=103588&action=review > > > Source/WebKit/chromium/public/WebFrameClient.h:44 > > +#include "v8/include/v8.h" > > we often just forward declare V8 types. see WebFrame.h for example. I tried that initially, but it does not compile. I think this is because the usage in WebFrameClient is in an implemented method, not just a declared one? > > Source/WebKit/chromium/public/WebFrameClient.h:312 > > + virtual void didCreateIsolatedScriptContext(WebFrame*, int isolatedWorldId, v8::Handle<v8::Context>) { } > > in WebFrame.h, we refer to isolatedWorldId as "worldID" > > I assume both of these integers refer to the same thing, so probably would be good to use the same exact variable name for these. Yes, done. > > Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:85 > > +#if WEBKIT_USING_V8 > > though it really doesn't matter that much, you might go with USE(V8) to match what you do below. since this file is implementing a WebCore interface, and the WebCore interface uses USE(V8), perhaps this file should do the same? Done.
Aaron Boodman
Comment 10 2011-08-11 12:22:52 PDT
Darin Fisher (:fishd, Google)
Comment 11 2011-08-11 12:52:58 PDT
(In reply to comment #9) > (In reply to comment #8) > > (From update of attachment 103588 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=103588&action=review > > > > > Source/WebKit/chromium/public/WebFrameClient.h:44 > > > +#include "v8/include/v8.h" > > > > we often just forward declare V8 types. see WebFrame.h for example. > > I tried that initially, but it does not compile. I think this is because the usage in WebFrameClient is in an implemented method, not just a declared one? Ah... this will be the first instance of including v8.h from a public header. I think you might want to make this be #include <v8.h> since V8 is a third-party library. That's how we include Skia headers from the WebKit API headers, for example. The WebKit headers do not assume a common Chromium-style global include root that contains v8. Also, it looks like v8.gyp puts v8/include on the include search path. WebCore also just does #include <v8.h>.
Darin Fisher (:fishd, Google)
Comment 12 2011-08-11 12:53:27 PDT
Comment on attachment 103656 [details] Patch R=me except for the v8 include issue.
Aaron Boodman
Comment 13 2011-08-15 12:52:36 PDT
Note You need to log in before you can comment on or make changes to this bug.