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

Unified Diff: Source/bindings/v8/custom/V8PromiseCustom.cpp

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
Index: Source/bindings/v8/custom/V8PromiseCustom.cpp
diff --git a/Source/bindings/v8/custom/V8PromiseCustom.cpp b/Source/bindings/v8/custom/V8PromiseCustom.cpp
index 08a414b07bfb85f05d76d498147905dbd03789b8..dc93e283033b822dfb6368feeba9b22631232b89 100644
--- a/Source/bindings/v8/custom/V8PromiseCustom.cpp
+++ b/Source/bindings/v8/custom/V8PromiseCustom.cpp
@@ -55,7 +55,7 @@ namespace WebCore {
namespace {
-v8::Local<v8::ObjectTemplate> cachedObjectTemplate(void* privateTemplateUniqueKey, int internalFieldCount, v8::Isolate* isolate)
+v8::Local<v8::ObjectTemplate> cachedObjectTemplate(const void* privateTemplateUniqueKey, int internalFieldCount, v8::Isolate* isolate)
{
V8PerIsolateData* data = V8PerIsolateData::from(isolate);
WrapperWorldType currentWorldType = worldType(isolate);
@@ -73,21 +73,21 @@ v8::Local<v8::ObjectTemplate> cachedObjectTemplate(void* privateTemplateUniqueKe
v8::Local<v8::ObjectTemplate> promiseAllEnvironmentObjectTemplate(v8::Isolate* isolate)
{
// This is only for getting a unique pointer which we can pass to privateTemplate.
- static int privateTemplateUniqueKey = 0;
+ static const int privateTemplateUniqueKey = 0;
return cachedObjectTemplate(&privateTemplateUniqueKey, V8PromiseCustom::PromiseAllEnvironmentFieldCount, isolate);
}
v8::Local<v8::ObjectTemplate> primitiveWrapperObjectTemplate(v8::Isolate* isolate)
{
// This is only for getting a unique pointer which we can pass to privateTemplate.
- static int privateTemplateUniqueKey = 0;
+ static const int privateTemplateUniqueKey = 0;
return cachedObjectTemplate(&privateTemplateUniqueKey, V8PromiseCustom::PrimitiveWrapperFieldCount, isolate);
}
v8::Local<v8::ObjectTemplate> internalObjectTemplate(v8::Isolate* isolate)
{
// This is only for getting a unique pointer which we can pass to privateTemplate.
- static int privateTemplateUniqueKey = 0;
+ static const int privateTemplateUniqueKey = 0;
return cachedObjectTemplate(&privateTemplateUniqueKey, V8PromiseCustom::InternalFieldCount, isolate);
}

Powered by Google App Engine
This is Rietveld 408576698