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

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

Issue 2989793003: Revert of [Bindings] Create and use V8 context snapshots (Closed)
Patch Set: Created 3 years, 5 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/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 5e78d3d913b798d248d16745a025c31bca77a808..9bac22664ef6fd6633b59e8c547db45dcf8b8eaf 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp
@@ -470,26 +470,23 @@
v8::FunctionTemplate::New(isolate, callback, v8::Local<v8::Value>(),
signature, config.length);
function_template->RemovePrototype();
- if (config.access_check_configuration == V8DOMConfiguration::kCheckAccess) {
+ if (config.access_check_configuration == V8DOMConfiguration::kCheckAccess)
function_template->SetAcceptAnyReceiver(false);
- }
v8::Local<v8::Function> function =
function_template->GetFunction(isolate->GetCurrentContext())
.ToLocalChecked();
- if (location & V8DOMConfiguration::kOnInstance && !instance.IsEmpty()) {
+ if (location & V8DOMConfiguration::kOnInstance && !instance.IsEmpty())
instance
->DefineOwnProperty(
isolate->GetCurrentContext(), name, function,
static_cast<v8::PropertyAttribute>(config.attribute))
.ToChecked();
- }
- if (location & V8DOMConfiguration::kOnPrototype && !prototype.IsEmpty()) {
+ if (location & V8DOMConfiguration::kOnPrototype && !prototype.IsEmpty())
prototype
->DefineOwnProperty(
isolate->GetCurrentContext(), name, function,
static_cast<v8::PropertyAttribute>(config.attribute))
.ToChecked();
- }
}
if (location & V8DOMConfiguration::kOnInterface && !interface.IsEmpty()) {
// Operations installed on the interface object must be static
@@ -756,16 +753,16 @@
WrapperTypeInfo* wrapper_type_info,
InstallTemplateFunction configure_dom_class_template) {
V8PerIsolateData* data = V8PerIsolateData::From(isolate);
- v8::Local<v8::FunctionTemplate> interface_template =
+ v8::Local<v8::FunctionTemplate> result =
data->FindInterfaceTemplate(world, wrapper_type_info);
- if (!interface_template.IsEmpty())
- return interface_template;
-
- interface_template = v8::FunctionTemplate::New(
+ if (!result.IsEmpty())
+ return result;
+
+ result = v8::FunctionTemplate::New(
isolate, V8ObjectConstructor::IsValidConstructorMode);
- configure_dom_class_template(isolate, world, interface_template);
- data->SetInterfaceTemplate(world, wrapper_type_info, interface_template);
- return interface_template;
+ configure_dom_class_template(isolate, world, result);
+ data->SetInterfaceTemplate(world, wrapper_type_info, result);
+ return result;
}
void V8DOMConfiguration::SetClassString(

Powered by Google App Engine
This is Rietveld 408576698