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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp

Issue 2913403003: v8binding: Fixes static readonly wrapper-returning attributes. (Closed)
Patch Set: Created 3 years, 7 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: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
index 870eb79981fda72e1dd156cc4650c8147baebab9..017a7082858a4d8f2d31aabb07c1e7a26d15713a 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
@@ -36,7 +36,6 @@
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/bindings/ScriptState.h"
#include "platform/bindings/V8ObjectConstructor.h"
-#include "platform/bindings/V8PrivateProperty.h"
#include "platform/wtf/GetPtr.h"
#include "platform/wtf/RefPtr.h"
#include "public/platform/WebFeature.h"
@@ -375,18 +374,7 @@ static void staticReadOnlyStringAttributeAttributeGetter(const v8::FunctionCallb
}
static void staticReadOnlyReturnDOMWrapperAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
- TestInterfaceImplementation* cppValue(WTF::GetPtr(TestInterfaceImplementation::staticReadOnlyReturnDOMWrapperAttribute()));
-
- // Keep the wrapper object for the return value alive as long as |this|
- // object is alive in order to save creation time of the wrapper object.
- if (cppValue && DOMDataStore::SetReturnValue(info.GetReturnValue(), cppValue))
- return;
- v8::Local<v8::Value> v8Value(ToV8(cppValue, holder, info.GetIsolate()));
- V8PrivateProperty::GetSymbol(
- info.GetIsolate(), "KeepAlive#TestInterface#staticReadOnlyReturnDOMWrapperAttribute")
- .Set(holder, v8Value);
-
- V8SetReturnValue(info, v8Value);
+ V8SetReturnValue(info, WTF::GetPtr(TestInterfaceImplementation::staticReadOnlyReturnDOMWrapperAttribute()), info.GetIsolate()->GetCurrentContext()->Global());
}
static void staticConditionalReadOnlyLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {

Powered by Google App Engine
This is Rietveld 408576698