WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 45217
Indicate which one of the ScriptWorlds for a Frame the Window Object has been cleared for.
https://bugs.webkit.org/show_bug.cgi?id=45217
Summary
Indicate which one of the ScriptWorlds for a Frame the Window Object has been...
Jessie Berlin
Reported
2010-09-03 17:42:44 PDT
WKBundlePageLoaderClient's WKBundlePageDidClearWindowObjectForFrameCallback should be a WKBundlePageDidClearWindowObjectForFrameInScriptWorldCallback, since there may be multiple ScriptWorlds for one Frame.
Attachments
didClearWindowObjectForFrame -> didClearWindowObjectForFrameInScriptWorld
(12.40 KB, patch)
2010-09-07 08:24 PDT
,
Jessie Berlin
no flags
Details
Formatted Diff
Diff
didClearWindowObjectForFrame -> didClearWindowObjectForFrameInScriptWorld (Take 2 - Style Errors Fixed)
(12.39 KB, patch)
2010-09-07 08:38 PDT
,
Jessie Berlin
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Jessie Berlin
Comment 1
2010-09-07 08:24:19 PDT
Created
attachment 66723
[details]
didClearWindowObjectForFrame -> didClearWindowObjectForFrameInScriptWorld
WebKit Review Bot
Comment 2
2010-09-07 08:26:38 PDT
Attachment 66723
[details]
did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h:81: Extra space between WKBundlePageDidClearWindowObjectForFrameInScriptWorldCallback and didClearWindowObjectForFrameInScriptWorld [whitespace/declaration] [3] WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:34: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jessie Berlin
Comment 3
2010-09-07 08:38:06 PDT
Created
attachment 66726
[details]
didClearWindowObjectForFrame -> didClearWindowObjectForFrameInScriptWorld (Take 2 - Style Errors Fixed) Fixed style errors.
Darin Adler
Comment 4
2010-09-07 09:08:41 PDT
Comment on
attachment 66726
[details]
didClearWindowObjectForFrame -> didClearWindowObjectForFrameInScriptWorld (Take 2 - Style Errors Fixed) I don’t think you need to add “InScriptWord” to the name of the function. That’s the normal naming for Objective-C, but here in C++ I think it is not much clearer and makes the function name longer than necessary. I suppose it’s nice to clarify that this has to be called separately for each world, but I also think the arguments makes that clear. It does seem unfortunate that we will have to create a script world just to pass to the caller.
> - WKBundlePageDidClearWindowObjectForFrameCallback didClearWindowObjectForFrame; > + WKBundlePageDidClearWindowObjectForFrameInScriptWorldCallback didClearWindowObjectForFrameInScriptWorld;
It looks like this is no longer aligned. This is why I normally request that we not line things up like this. Worth talking to Sam about eliminating the vertical alignment, but for now maybe you should add spaces to keep things lined up. r=me
Jessie Berlin
Comment 5
2010-09-07 09:53:50 PDT
(In reply to
comment #4
)
> (From update of
attachment 66726
[details]
) > I don’t think you need to add “InScriptWord” to the name of the function. That’s the normal naming for Objective-C, but here in C++ I think it is not much clearer and makes the function name longer than necessary. I suppose it’s nice to clarify that this has to be called separately for each world, but I also think the arguments makes that clear. >
I originally added "InScriptWorld" to match IWebFrameLoadDelegatePrivate2's didClearWindowObjectForFrameInScriptWorld. However, your argument makes more sense, so I just removed the extra "InScriptWorld"s.
> It does seem unfortunate that we will have to create a script world just to pass to the caller. >
I am not sure how else we would go about getting the script world.
> > - WKBundlePageDidClearWindowObjectForFrameCallback didClearWindowObjectForFrame; > > + WKBundlePageDidClearWindowObjectForFrameInScriptWorldCallback didClearWindowObjectForFrameInScriptWorld; > > It looks like this is no longer aligned. This is why I normally request that we not line things up like this. Worth talking to Sam about eliminating the vertical alignment, but for now maybe you should add spaces to keep things lined up. >
In my original patch it was aligned, but then the check-webkit-style script issued a warning about too many spaces. I will align it again.
> r=me
Thanks!
Jessie Berlin
Comment 6
2010-09-07 11:11:53 PDT
Comment on
attachment 66726
[details]
didClearWindowObjectForFrame -> didClearWindowObjectForFrameInScriptWorld (Take 2 - Style Errors Fixed) Committed in
r66894
:
http://trac.webkit.org/changeset/66894
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