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

Unified Diff: Source/bindings/scripts/code_generator_v8.pm

Issue 29553002: Move privateTemplateUniqueKey / sharedTemplateUniqueKey to .bss section (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update sharedTemplateUniqueKey as well Created 7 years, 2 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 | « no previous file | Source/bindings/tests/results/V8TestActiveDOMObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/code_generator_v8.pm
diff --git a/Source/bindings/scripts/code_generator_v8.pm b/Source/bindings/scripts/code_generator_v8.pm
index 8d63d0b946603ac7004090d8a26b81b0805ffd17..8bb05dbaa25f8ee9f298de04e17259577bf2d483 100644
--- a/Source/bindings/scripts/code_generator_v8.pm
+++ b/Source/bindings/scripts/code_generator_v8.pm
@@ -1186,7 +1186,7 @@ sub GenerateDomainSafeFunctionGetter
static void ${funcName}AttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
// This is only for getting a unique pointer which we can pass to privateTemplate.
- static const char* privateTemplateUniqueKey = "${funcName}PrivateTemplate";
+ static const int privateTemplateUniqueKey = 0;
digit1 2013/10/19 08:04:17 This looks really good. For the record, you can a
Inactive 2013/10/22 14:25:42 So it looks like msvc optimizes out the static var
WrapperWorldType currentWorldType = worldType(info.GetIsolate());
V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate());
v8::Handle<v8::FunctionTemplate> privateTemplate = data->privateTemplate(currentWorldType, &privateTemplateUniqueKey, $newTemplateParams, $functionLength);
@@ -1200,7 +1200,7 @@ static void ${funcName}AttributeGetter(v8::Local<v8::String> name, const v8::Pro
}
${implClassName}* imp = ${v8ClassName}::toNative(holder);
if (!BindingSecurity::shouldAllowAccessToFrame(imp->frame(), DoNotReportSecurityError)) {
- static const char* sharedTemplateUniqueKey = "${funcName}SharedTemplate";
+ static const int sharedTemplateUniqueKey = 0;
v8::Handle<v8::FunctionTemplate> sharedTemplate = data->privateTemplate(currentWorldType, &sharedTemplateUniqueKey, $newTemplateParams, $functionLength);
v8SetReturnValue(info, sharedTemplate->GetFunction());
return;
@@ -2994,7 +2994,7 @@ END
v8::Handle<v8::FunctionTemplate> ${v8ClassName}Constructor::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
// This is only for getting a unique pointer which we can pass to privateTemplate.
- static const char* privateTemplateUniqueKey = "${v8ClassName}Constructor::GetTemplatePrivateTemplate";
+ static const int privateTemplateUniqueKey = 0;
V8PerIsolateData* data = V8PerIsolateData::from(isolate);
v8::Handle<v8::FunctionTemplate> result = data->privateTemplateIfExists(currentWorldType, &privateTemplateUniqueKey);
if (!result.IsEmpty())
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8TestActiveDOMObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698