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

Unified Diff: Source/bindings/tests/results/core/V8TestSpecialOperations.cpp

Issue 871443002: IDL: Further improve indexed/named property setter type checking (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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/tests/results/core/V8TestInterface2.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/core/V8TestSpecialOperations.cpp
diff --git a/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp b/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp
index 97152c2ef6be50535374d07dd5ca6048e0a9f189..d4f5ebe1b8c39dbb7c17119f5e68c7fa977479bb 100644
--- a/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp
+++ b/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp
@@ -88,6 +88,11 @@ static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v
TestSpecialOperations* impl = V8TestSpecialOperations::toImpl(info.Holder());
TOSTRING_VOID(V8StringResource<>, propertyName, nameString);
Node* propertyValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ if (!propertyValue && !isUndefinedOrNull(v8Value)) {
+ exceptionState.throwTypeError("The provided value is not of type 'Node'.");
+ exceptionState.throwIfNeeded();
+ return;
+ }
bool result = impl->anonymousNamedSetter(propertyName, propertyValue);
if (!result)
return;
« no previous file with comments | « Source/bindings/tests/results/core/V8TestInterface2.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698