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

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

Issue 555133003: Use ExceptionState to throw exceptions when converting arrays (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/core/v8/DictionaryHelperForCore.cpp
diff --git a/Source/bindings/core/v8/DictionaryHelperForCore.cpp b/Source/bindings/core/v8/DictionaryHelperForCore.cpp
index e6dbd86e38d776781f02fdd463bd9250c0fbe212..16f64a943b891c60d13d55a9e3007ff67839e8ae 100644
--- a/Source/bindings/core/v8/DictionaryHelperForCore.cpp
+++ b/Source/bindings/core/v8/DictionaryHelperForCore.cpp
@@ -275,9 +275,10 @@ bool DictionaryHelper::get(const Dictionary& dictionary, const String& key, Mess
ASSERT(dictionary.isolate() == v8::Isolate::GetCurrent());
if (blink::isUndefinedOrNull(v8Value))
return true;
- bool success = false;
- value = toRefPtrWillBeMemberNativeArray<MessagePort, V8MessagePort>(v8Value, key, dictionary.isolate(), &success);
- return success;
+ // FIXME (before landing): We can't use a NonThrowableExceptionState here; figure out what to do instead.
Jens Widell 2014/09/11 13:22:31 Need to resolve this. I thought I couldn't create
+ NonThrowableExceptionState exceptionState;
+ value = toRefPtrWillBeMemberNativeArray<MessagePort, V8MessagePort>(v8Value, key, dictionary.isolate(), exceptionState);
+ return !exceptionState.throwIfNeeded();
}
template <>

Powered by Google App Engine
This is Rietveld 408576698