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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp

Issue 2777943005: [Bindings] Move and remove some private symbols from V8HiddenValue (Closed)
Patch Set: Rebase Created 3 years, 9 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/core/v8/V8LazyEventListener.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp b/third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp
index 046d1ebe7d302cf126935205f0c7c8d808771183..91dc4aa93518ea8392c9de5762de677c29cc50b4 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp
@@ -37,8 +37,8 @@
#include "bindings/core/v8/V8DOMWrapper.h"
#include "bindings/core/v8/V8Document.h"
#include "bindings/core/v8/V8HTMLFormElement.h"
-#include "bindings/core/v8/V8HiddenValue.h"
#include "bindings/core/v8/V8Node.h"
+#include "bindings/core/v8/V8PrivateProperty.h"
#include "bindings/core/v8/V8ScriptRunner.h"
#include "core/dom/Document.h"
#include "core/dom/Node.h"
@@ -117,10 +117,9 @@ v8::Local<v8::Value> V8LazyEventListener::callListenerFunction(
static void V8LazyEventListenerToString(
const v8::FunctionCallbackInfo<v8::Value>& info) {
- v8SetReturnValue(info,
- V8HiddenValue::getHiddenValue(
- ScriptState::current(info.GetIsolate()), info.Holder(),
- V8HiddenValue::toStringString(info.GetIsolate())));
+ v8::Isolate* isolate = info.GetIsolate();
+ v8SetReturnValue(info, V8PrivateProperty::getToStringString(isolate).get(
Yuki 2017/03/29 12:36:05 s/get/getOrUndefined/
peria 2017/03/30 09:30:16 Done.
+ isolate->GetCurrentContext(), info.Holder()));
}
v8::Local<v8::Object> V8LazyEventListener::getListenerObjectInternal(
@@ -221,9 +220,9 @@ void V8LazyEventListener::compileScript(ScriptState* scriptState,
return;
String toStringString = "function " + m_functionName + "(" +
m_eventParameterName + ") {\n " + m_code + "\n}";
- V8HiddenValue::setHiddenValue(scriptState, wrappedFunction,
- V8HiddenValue::toStringString(isolate()),
- v8String(isolate(), toStringString));
+ V8PrivateProperty::getToStringString(isolate()).set(
+ isolate()->GetCurrentContext(), wrappedFunction,
+ v8String(isolate(), toStringString));
if (!v8CallBoolean(wrappedFunction->CreateDataProperty(
scriptState->context(), v8AtomicString(isolate(), "toString"),
toStringFunction)))

Powered by Google App Engine
This is Rietveld 408576698