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

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

Issue 568703002: IDL: Values for dictionaries should be a object, null or undefined (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove assertion and added a guard Created 6 years, 3 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
Index: Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
diff --git a/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp b/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
index 4cbc3cbace99d8e096903fe8fb4d5fa52326997a..55553283766c9d39371640d5eb98061fafbad46a 100644
--- a/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
@@ -53,7 +53,7 @@ static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
v8::TryCatch block;
V8RethrowTryCatchScope rethrow(block);
TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolate()));
- if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) {
+ if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
V8ThrowException::throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceConstructor2", "parameter 1 ('dictionaryArg') is not an object."), info.GetIsolate());
return;
}
@@ -85,7 +85,7 @@ static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info)
defaultNullStringOptionalStringArg = nullptr;
}
TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary(info[4], info.GetIsolate()));
- if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defaultUndefinedOptionalDictionaryArg.isObject()) {
+ if (!isUndefinedOrNull(info[4]) && !info[4]->IsObject()) {
exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptionalDictionaryArg') is not an object.");
exceptionState.throwIfNeeded();
return;

Powered by Google App Engine
This is Rietveld 408576698