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

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

Issue 625943002: Catch uncaught promise rejections from V8 and log to console. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 6 years, 2 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/ScriptValue.cpp
diff --git a/Source/bindings/core/v8/ScriptValue.cpp b/Source/bindings/core/v8/ScriptValue.cpp
index 5b7a362ce41c97e9952fceecdb756f13e0f14e18..c7e9918b131c19ec56172f1d8176aab366ea5768 100644
--- a/Source/bindings/core/v8/ScriptValue.cpp
+++ b/Source/bindings/core/v8/ScriptValue.cpp
@@ -37,6 +37,17 @@
namespace blink {
+int ScriptValue::identityHash() const
+{
+ if (isEmpty())
+ return 0;
+ v8::HandleScope handleScope(isolate());
+ v8::Local<v8::Value> value = m_value->newLocal(isolate());
+ if (!value->IsObject())
+ return 0;
+ return v8::Local<v8::Object>::Cast(value)->GetIdentityHash();
+}
+
v8::Handle<v8::Value> ScriptValue::v8Value() const
{
if (isEmpty())

Powered by Google App Engine
This is Rietveld 408576698