Index: third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp b/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp |
index 1f7d79ad77138ed6a703d0afcebaaea6af7ebb0f..9e2c84974267cc04b982375dbf6c65aab06a03d7 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp |
@@ -29,6 +29,7 @@ |
#include "bindings/core/v8/V8DOMConfiguration.h" |
#include "bindings/core/v8/GeneratedCodeHelper.h" // just for DCHECK |
+#include "bindings/core/v8/ScriptState.h" |
#include "bindings/core/v8/V8ObjectConstructor.h" |
#include "bindings/core/v8/V8PerContextData.h" |
#include "platform/tracing/TraceEvent.h" |
@@ -78,11 +79,13 @@ void installAttributeInternal( |
} |
void installAttributeInternal( |
- v8::Isolate* isolate, |
+ const ScriptState* scriptState, |
v8::Local<v8::Object> instance, |
v8::Local<v8::Object> prototype, |
- const V8DOMConfiguration::AttributeConfiguration& attribute, |
- const DOMWrapperWorld& world) { |
+ const V8DOMConfiguration::AttributeConfiguration& attribute) { |
+ v8::Isolate* isolate = scriptState->isolate(); |
+ const DOMWrapperWorld& world = scriptState->world(); |
+ |
if (attribute.exposeConfiguration == |
V8DOMConfiguration::OnlyExposedToPrivateScript && |
!world.isPrivateScriptIsolatedWorld()) |
@@ -98,21 +101,21 @@ void installAttributeInternal( |
DCHECK_EQ(&v8ConstructorAttributeGetter, attribute.getter); |
V8PerContextData* perContextData = |
- V8PerContextData::from(isolate->GetCurrentContext()); |
- v8::Local<v8::Function> data = |
+ V8PerContextData::from(scriptState->context()); |
+ v8::Local<v8::Function> value = |
perContextData->constructorForType(attribute.data); |
DCHECK(attribute.propertyLocationConfiguration); |
if (attribute.propertyLocationConfiguration & V8DOMConfiguration::OnInstance) |
instance |
->DefineOwnProperty( |
- isolate->GetCurrentContext(), name, data, |
+ isolate->GetCurrentContext(), name, value, |
static_cast<v8::PropertyAttribute>(attribute.attribute)) |
.ToChecked(); |
if (attribute.propertyLocationConfiguration & V8DOMConfiguration::OnPrototype) |
prototype |
->DefineOwnProperty( |
- isolate->GetCurrentContext(), name, data, |
+ isolate->GetCurrentContext(), name, value, |
static_cast<v8::PropertyAttribute>(attribute.attribute)) |
.ToChecked(); |
if (attribute.propertyLocationConfiguration & V8DOMConfiguration::OnInterface) |
@@ -415,12 +418,11 @@ void V8DOMConfiguration::installAttribute( |
} |
void V8DOMConfiguration::installAttribute( |
- v8::Isolate* isolate, |
- const DOMWrapperWorld& world, |
+ const ScriptState* scriptState, |
v8::Local<v8::Object> instance, |
v8::Local<v8::Object> prototype, |
const AttributeConfiguration& attribute) { |
- installAttributeInternal(isolate, instance, prototype, attribute, world); |
+ installAttributeInternal(scriptState, instance, prototype, attribute); |
} |
void V8DOMConfiguration::installAccessors( |