Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Unified Diff: Source/bindings/core/v8/V8DOMConfiguration.cpp

Issue 1161463009: bindings: Supports [LenientThis] extended attributes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added a layout test for [LenientThis]. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/core/v8/V8DOMConfiguration.h ('k') | Source/bindings/scripts/v8_attributes.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8DOMConfiguration.cpp
diff --git a/Source/bindings/core/v8/V8DOMConfiguration.cpp b/Source/bindings/core/v8/V8DOMConfiguration.cpp
index 0cd625ba91c746f31caed20a4686da8daa33b095..ad487a8acca735300a0ec4bc8b706eb710bc32e7 100644
--- a/Source/bindings/core/v8/V8DOMConfiguration.cpp
+++ b/Source/bindings/core/v8/V8DOMConfiguration.cpp
@@ -102,6 +102,11 @@ void installAccessorInternal(v8::Isolate* isolate, v8::Local<ObjectOrTemplate> p
if (accessor.setterForMainWorld)
setterCallback = accessor.setterForMainWorld;
}
+ // Support [LenientThis] by not specifying the signature. V8 does not do
+ // the type checking against holder if no signature is specified. Note that
+ // info.Holder() passed to callbacks will be *unsafe*.
+ if (accessor.holderCheckConfiguration == V8DOMConfiguration::DoNotCheckHolder)
+ signature = v8::Local<v8::Signature>();
prototypeOrTemplate->SetAccessorProperty(
v8AtomicString(isolate, accessor.name),
functionOrTemplate(isolate, getterCallback, accessor.data, signature, 0, prototypeOrTemplate),
« no previous file with comments | « Source/bindings/core/v8/V8DOMConfiguration.h ('k') | Source/bindings/scripts/v8_attributes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698