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

Unified Diff: Source/bindings/core/v8/V8BindingMacros.h

Issue 604833002: Use ExceptionState when converting string arguments to promise methods (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
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_methods.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8BindingMacros.h
diff --git a/Source/bindings/core/v8/V8BindingMacros.h b/Source/bindings/core/v8/V8BindingMacros.h
index 5afc52ef3f56b6ec8179b8f6733bb9075c119f0c..8c31f8ec5919a120a8d46a83e2e540a7c9b260f9 100644
--- a/Source/bindings/core/v8/V8BindingMacros.h
+++ b/Source/bindings/core/v8/V8BindingMacros.h
@@ -135,21 +135,13 @@ namespace blink {
if (UNLIKELY(!var.prepare())) \
return retVal;
-// We need to cancel the exception propergation when we return a rejected
+// We need to cancel the exception propagation when we return a rejected
// Promise.
-#define TOSTRING_VOID_PROMISE_INTERNAL(var, value, info) \
- var = (value); \
- if (UNLIKELY(!var.prepare())) { \
- info.GetReturnValue().Set(ScriptPromise::rejectRaw(info.GetIsolate(), block.Exception())); \
- block.Reset(); \
- return; \
- }
-
-#define TOSTRING_VOID_PROMISE(type, var, value, info) \
Jens Widell 2014/09/25 13:51:14 This macro was never used, BTW. The corresponding
- type var; \
- { \
- v8::TryCatch block; \
- TOSTRING_VOID_PROMISE_INTERNAL(type, var, value, info); \
+#define TOSTRING_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState, info, scriptState) \
+ var = (value); \
+ if (UNLIKELY(!var.prepare(exceptionState))) { \
+ v8SetReturnValue(info, exceptionState.reject(scriptState).v8Value()); \
+ return; \
}
} // namespace blink
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_methods.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698