| 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);
|
| +}
|
| +
|
| }
|
|
|