Bug 182524

Summary: There should be a way to disable [OverrideBuiltins] behavior in a given DOMWrapperWorld
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: BindingsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, cdumez, commit-queue, darin, keith_miller, mark.lam, rmondello, rniwa, saam, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
WIP Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

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.