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

Unified Diff: Source/bindings/core/dart/DartJsInteropData.cpp

Issue 1663753002: Apply all blink changes between @202695 and tip of trunk (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/2454_1
Patch Set: Created 4 years, 11 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 | « Source/bindings/core/dart/DartJsInteropData.h ('k') | Source/bindings/core/dart/DartNativeUtilities.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/dart/DartJsInteropData.cpp
diff --git a/Source/bindings/core/dart/DartJsInteropData.cpp b/Source/bindings/core/dart/DartJsInteropData.cpp
index ddad8454cfe4cbfd15fe5a12e62484bead3e6e8b..00776e6aad51f6771bf11e79dcd2b07fb99b8c3a 100644
--- a/Source/bindings/core/dart/DartJsInteropData.cpp
+++ b/Source/bindings/core/dart/DartJsInteropData.cpp
@@ -30,7 +30,9 @@
#include "config.h"
#include "bindings/core/dart/DartJsInteropData.h"
+#include "bindings/core/dart/V8Converter.h"
+#include <dart_api.h>
#include <string.h>
namespace blink {
@@ -73,4 +75,13 @@ v8::Local<v8::Function> DartJsInteropData::instanceofFunction()
return cacheFunction(&m_instanceofFunction, "(function (type) { return this instanceof type; })");
}
+v8::Local<v8::String> DartJsInteropData::existingDartWrapperHiddenField(v8::Isolate* v8Isolate) {
+ if (m_existingDartWrapperHiddenField.IsEmpty()) {
+ // We are abusing Dart_DebugName() as it is supposed to give a unique
+ // per isolate name.
+ m_existingDartWrapperHiddenField.Reset(v8Isolate, v8::String::Concat(v8::String::NewFromUtf8(v8Isolate, "$existing_dart_wrapper_"), V8Converter::stringToV8(Dart_DebugName())));
+ }
+ return v8::Local<v8::String>::New(v8Isolate, m_existingDartWrapperHiddenField);
+}
+
}
« no previous file with comments | « Source/bindings/core/dart/DartJsInteropData.h ('k') | Source/bindings/core/dart/DartNativeUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698