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

Unified Diff: Source/bindings/v8/V8StringResource.h

Issue 232563003: API functions returning Promises should not throw exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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/v8/V8StringResource.h
diff --git a/Source/bindings/v8/V8StringResource.h b/Source/bindings/v8/V8StringResource.h
index feb63a990952c79ad04828cd77fe693c67edb140..9869cc8f2987ae0d3aa3bf68b3e07df5a84e0bd7 100644
--- a/Source/bindings/v8/V8StringResource.h
+++ b/Source/bindings/v8/V8StringResource.h
@@ -199,14 +199,9 @@ private:
}
m_mode = DoNotExternalize;
- v8::TryCatch block;
m_v8Object = m_v8Object->ToString();
- // Handle the case where an exception is thrown as part of invoking toString on the object.
- if (block.HasCaught()) {
- block.ReThrow();
- return false;
- }
- return true;
+ // Returns false when an exception is thrown from toString.
+ return !m_v8Object.IsEmpty();
haraken 2014/04/11 13:57:13 I double-checked and confirmed that the new code l
yhirano 2014/04/14 06:12:43 Actually, layout tests show that some regressions
}
void setString(const String& string)

Powered by Google App Engine
This is Rietveld 408576698