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

Unified Diff: Source/bindings/v8/V8DOMConfiguration.cpp

Issue 336653004: Decrease binary size by 43 KB by removing V8XXX::domTemplate (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/bindings/v8/V8DOMConfiguration.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8DOMConfiguration.cpp
diff --git a/Source/bindings/v8/V8DOMConfiguration.cpp b/Source/bindings/v8/V8DOMConfiguration.cpp
index 3d4daeb0abc4c867a43deed4079da6dec1811995..13f2bf3659b3cb72ac97fa915db20a39c8df88f4 100644
--- a/Source/bindings/v8/V8DOMConfiguration.cpp
+++ b/Source/bindings/v8/V8DOMConfiguration.cpp
@@ -30,6 +30,8 @@
#include "bindings/v8/V8DOMConfiguration.h"
#include "bindings/v8/V8Binding.h"
+#include "bindings/v8/V8ObjectConstructor.h"
+#include "platform/TraceEvent.h"
namespace WebCore {
@@ -117,4 +119,18 @@ v8::Local<v8::Signature> V8DOMConfiguration::installDOMClassTemplate(v8::Handle<
return defaultSignature;
}
+v8::Handle<v8::FunctionTemplate> V8DOMConfiguration::domClassTemplate(v8::Isolate* isolate, WrapperTypeInfo* wrapperTypeInfo, void (*configureDOMClassTemplate)(v8::Handle<v8::FunctionTemplate>, v8::Isolate*))
+{
+ V8PerIsolateData* data = V8PerIsolateData::from(isolate);
+ v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(wrapperTypeInfo);
+ if (!result.IsEmpty())
+ return result;
+
+ TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
+ result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidConstructorMode);
+ configureDOMClassTemplate(result, isolate);
+ data->setDOMTemplate(wrapperTypeInfo, result);
+ return result;
+}
+
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/V8DOMConfiguration.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698