Bug 182524 - There should be a way to disable [OverrideBuiltins] behavior in a given DOMWrapperWorld
Summary: There should be a way to disable [OverrideBuiltins] behavior in a given DOMWr...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-02-05 20:09 PST by Chris Dumez
Modified: 2018-02-08 20:16 PST (History)
11 users (show)

See Also:


Attachments
Patch (4.42 KB, patch)
2018-02-05 20:12 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (5.77 KB, patch)
2018-02-06 21:14 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (26.04 KB, patch)
2018-02-06 21:51 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (26.10 KB, patch)
2018-02-06 21:53 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (26.42 KB, patch)
2018-02-07 18:50 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (28.34 KB, patch)
2018-02-07 19:04 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (27.23 KB, patch)
2018-02-07 19:05 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (27.25 KB, patch)
2018-02-08 19:20 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2018-02-05 20:09:38 PST
Make [OverrideBuiltins] a no-op outside the normal world. This is a legacy feature that is only needed for backward compatibility.
Let's try and make it a no-op outside the normal world.
Comment 1 Chris Dumez 2018-02-05 20:09:58 PST
<rdar://problem/9057327>
Comment 2 Chris Dumez 2018-02-05 20:12:26 PST
Created attachment 333153 [details]
Patch
Comment 3 Sam Weinig 2018-02-06 10:56:53 PST
This seems weird to me. This would mean that the same code written for a normal page would run different in an isolated world. If we want to make coding in an isolated world easier, I would rather it be an opt-in mode for the specific isolated world.
Comment 4 Chris Dumez 2018-02-06 21:14:16 PST
Created attachment 333262 [details]
WIP Patch
Comment 5 Chris Dumez 2018-02-06 21:51:09 PST
Created attachment 333264 [details]
Patch
Comment 6 Chris Dumez 2018-02-06 21:51:55 PST
<rdar://problem/37300983>
Comment 7 Chris Dumez 2018-02-06 21:53:26 PST
Created attachment 333265 [details]
Patch
Comment 8 Chris Dumez 2018-02-06 21:55:43 PST
(In reply to Sam Weinig from comment #3)
> This seems weird to me. This would mean that the same code written for a
> normal page would run different in an isolated world. If we want to make
> coding in an isolated world easier, I would rather it be an opt-in mode for
> the specific isolated world.

Ok, made it opt-in at Cocoa/C API level.
Comment 9 Ryosuke Niwa 2018-02-07 16:10:26 PST
Comment on attachment 333265 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=333265&action=review

This has implications in the structure of prototype objects.

> Tools/TestWebKitAPI/Tests/WebKit/override-builtins-test.html:5
> +<input id="test" name="tagName">

Please add a test case in the main world as well.
Comment 10 Chris Dumez 2018-02-07 18:50:24 PST
Created attachment 333349 [details]
Patch
Comment 11 Chris Dumez 2018-02-07 19:04:06 PST
Created attachment 333351 [details]
Patch
Comment 12 Chris Dumez 2018-02-07 19:05:35 PST
Created attachment 333352 [details]
Patch
Comment 13 WebKit Commit Bot 2018-02-08 19:08:42 PST
Comment on attachment 333352 [details]
Patch

Rejecting attachment 333352 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
urces/UnifiedSource17.cpp -o /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/UnifiedSource17.o

** BUILD FAILED **


The following build commands failed:
	CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/UnifiedSource8.o /Volumes/Data/EWS/WebKit/WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource8.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Full output: http://webkit-queues.webkit.org/results/6424076
Comment 14 Chris Dumez 2018-02-08 19:20:26 PST
Created attachment 333439 [details]
Patch
Comment 15 WebKit Commit Bot 2018-02-08 20:16:57 PST
Comment on attachment 333439 [details]
Patch

Clearing flags on attachment: 333439

Committed r228309: <https://trac.webkit.org/changeset/228309>
Comment 16 WebKit Commit Bot 2018-02-08 20:16:59 PST
All reviewed patches have been landed.  Closing bug.