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

Unified Diff: Source/bindings/tests/results/V8TestEventTarget.cpp

Issue 143943020: Replace [TreatNullAs=functionName] with [StrictTypeChecking] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update tests, Python, and IDLExtendedAttributes.txt Created 6 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/idls/TestEventTarget.idl ('k') | Source/core/html/HTMLOptionsCollection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestEventTarget.cpp
diff --git a/Source/bindings/tests/results/V8TestEventTarget.cpp b/Source/bindings/tests/results/V8TestEventTarget.cpp
index eff30204bb99bfe0b8497cf515fc49a9d3e1800c..b6289e2122d9b9dc55612416fe331ce575ec1ad0 100644
--- a/Source/bindings/tests/results/V8TestEventTarget.cpp
+++ b/Source/bindings/tests/results/V8TestEventTarget.cpp
@@ -130,6 +130,11 @@ static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> jsValue,
{
TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder());
V8TRYCATCH_VOID(Node*, propertyValue, V8Node::hasInstance(jsValue, info.GetIsolate()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
+ if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIsolate())) {
+ exceptionState.throwTypeError("The provided value is not of type 'Node'.");
+ exceptionState.throwIfNeeded();
+ return;
+ }
bool result = collection->anonymousIndexedSetter(index, propertyValue);
if (!result)
return;
@@ -196,11 +201,7 @@ static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value>
TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name);
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyValue, jsValue);
- bool result;
- if (jsValue->IsUndefined())
- result = collection->anonymousNamedSetterUndefined(propertyName);
- else
- result = collection->anonymousNamedSetter(propertyName, propertyValue);
+ bool result = collection->anonymousNamedSetter(propertyName, propertyValue);
if (!result)
return;
v8SetReturnValue(info, jsValue);
« no previous file with comments | « Source/bindings/tests/idls/TestEventTarget.idl ('k') | Source/core/html/HTMLOptionsCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698