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

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

Issue 2639893003: [ES6 modules] Introduce Modulator "module map settings object" (Closed)
Patch Set: Created 3 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
Index: third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp b/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp
index 8b8b7f8c213bc48b14f61c07630e46f8d9b0dd02..2f2ff3968943803d2f9cb5135b898f2ffe3d21b5 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp
@@ -34,6 +34,7 @@
#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8ObjectConstructor.h"
+#include "core/dom/Modulator.h"
#include "platform/InstanceCounters.h"
#include "wtf/PtrUtil.h"
#include "wtf/StringExtras.h"
@@ -48,7 +49,7 @@ V8PerContextData::V8PerContextData(v8::Local<v8::Context> context)
m_constructorMap(m_isolate),
m_contextHolder(WTF::makeUnique<gin::ContextHolder>(m_isolate)),
m_context(m_isolate, context),
- m_activityLogger(0) {
+ m_activityLogger(nullptr) {
m_contextHolder->SetContext(context);
v8::Context::Scope contextScope(context);
@@ -174,4 +175,14 @@ void V8PerContextData::addCustomElementBinding(
m_customElementBindings.push_back(std::move(binding));
}
+void V8PerContextData::setModulator(Modulator* modulator) {
+ DCHECK(!m_modulator);
+ DCHECK(modulator);
+ m_modulator = modulator;
+}
+
+void V8PerContextData::clearModulator() {
+ m_modulator = nullptr;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698