[V8] ScriptController::matchesCurrentContext duplicates code from ScriptController::currentWorldContext
Created attachment 160865 [details] Patch
Comment on attachment 160865 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=160865&action=review > Source/WebCore/bindings/v8/ScriptController.cpp:447 > + return v8::Context::GetCurrent() == contextForCurrentWorldPrivate(); CodeGeneratorV8.pm is the only caller site of matchesCurrentContext(). You might want to write this in CodeGeneratorV8.pm and remove matchesCurrentContext().
(In reply to comment #2) > (From update of attachment 160865 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=160865&action=review > > > Source/WebCore/bindings/v8/ScriptController.cpp:447 > > + return v8::Context::GetCurrent() == contextForCurrentWorldPrivate(); > > CodeGeneratorV8.pm is the only caller site of matchesCurrentContext(). You might want to write this in CodeGeneratorV8.pm and remove matchesCurrentContext(). Good point... The downside is that then I'd need to make contextForCurrentWorldPrivate non-private. Eric prefers the old names for these functions, so I'm going to try another iteration of the patch.
Created attachment 160869 [details] Patch
Comment on attachment 160869 [details] Patch Maybe unsafeHandleToCurrentWorldContext()? Otherwise looks fine.
Created attachment 161250 [details] Patch for landing
Comment on attachment 161250 [details] Patch for landing Clearing flags on attachment: 161250 Committed r127106: <http://trac.webkit.org/changeset/127106>
All reviewed patches have been landed. Closing bug.