RESOLVED FIXED 108476
Cleanup: Use ScriptExecutionContext::topOrigin when relevant.
https://bugs.webkit.org/show_bug.cgi?id=108476
Summary Cleanup: Use ScriptExecutionContext::topOrigin when relevant.
Mike West
Reported 2013-01-31 06:33:02 PST
http://wkbug.com/94171 introduced ScriptExecutionContext::topOrigin to avoid casting the execution context to either a WorkerContext or Document. We should use this new method rather than walking through the document's topDocument() directly.
Attachments
Patch (7.28 KB, patch)
2013-01-31 07:09 PST, Mike West
no flags
Patch for landing. (7.58 KB, patch)
2013-01-31 08:34 PST, Mike West
no flags
Mike West
Comment 1 2013-01-31 07:09:51 PST
WebKit Review Bot
Comment 2 2013-01-31 07:11:40 PST
Attachment 185775 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.cpp', u'Source/WebCore/page/DOMWindow.cpp', u'Source/WebCore/workers/SharedWorker.cpp', u'Source/WebCore/workers/WorkerMessagingProxy.cpp', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/WebProcess/Plugins/PluginView.cpp']" exit_code: 1 Source/WebCore/workers/WorkerMessagingProxy.cpp:285: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 1 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
jochen
Comment 3 2013-01-31 08:05:28 PST
Comment on attachment 185775 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=185775&action=review ok you'll need somebody from WK2 approve this. >> Source/WebCore/workers/WorkerMessagingProxy.cpp:285 >> + document->topOrigin()); > > Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] i would just put all arguments on one line to make the style queue happy
Anders Carlsson
Comment 4 2013-01-31 08:22:19 PST
Comment on attachment 185775 [details] Patch WK2 parts look fine!
jochen
Comment 5 2013-01-31 08:26:07 PST
Comment on attachment 185775 [details] Patch r=me
Mike West
Comment 6 2013-01-31 08:30:32 PST
(In reply to comment #3) > (From update of attachment 185775 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=185775&action=review > > ok > > you'll need somebody from WK2 approve this. Good eye, thank you. I think it would be worthwhile to add a message noting that, similar to what we do for the Chromium API. > >> Source/WebCore/workers/WorkerMessagingProxy.cpp:285 > >> + document->topOrigin()); > > > > Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] > > i would just put all arguments on one line to make the style queue happy A 280-character line is more or less like an 80-character line. *sigh*
Mike West
Comment 7 2013-01-31 08:34:36 PST
Created attachment 185789 [details] Patch for landing.
Adam Barth
Comment 8 2013-01-31 10:52:43 PST
> Patch for landing. Did you mean to mark this patch commit-queue? or commit-queue+ ?
Mike West
Comment 9 2013-01-31 11:50:19 PST
(In reply to comment #8) > > Patch for landing. > > Did you mean to mark this patch commit-queue? or commit-queue+ ? Hrm. I thought I uploaded with land-safely. I'll flip the bit by hand. *sigh* SO MUCH WORK.
WebKit Review Bot
Comment 10 2013-01-31 12:50:22 PST
Comment on attachment 185789 [details] Patch for landing. Clearing flags on attachment: 185789 Committed r141466: <http://trac.webkit.org/changeset/141466>
WebKit Review Bot
Comment 11 2013-01-31 12:50:26 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.