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

Side by Side Diff: Source/bindings/tests/results/V8TestActiveDOMObject.cpp

Issue 29553002: Move privateTemplateUniqueKey / sharedTemplateUniqueKey to .bss section (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) 129 static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
130 { 130 {
131 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 131 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
132 TestActiveDOMObjectV8Internal::postMessageMethod(args); 132 TestActiveDOMObjectV8Internal::postMessageMethod(args);
133 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 133 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
134 } 134 }
135 135
136 static void postMessageAttributeGetter(v8::Local<v8::String> name, const v8::Pro pertyCallbackInfo<v8::Value>& info) 136 static void postMessageAttributeGetter(v8::Local<v8::String> name, const v8::Pro pertyCallbackInfo<v8::Value>& info)
137 { 137 {
138 // This is only for getting a unique pointer which we can pass to privateTem plate. 138 // This is only for getting a unique pointer which we can pass to privateTem plate.
139 static const char* privateTemplateUniqueKey = "postMessagePrivateTemplate"; 139 static int privateTemplateUniqueKey;
140 WrapperWorldType currentWorldType = worldType(info.GetIsolate()); 140 WrapperWorldType currentWorldType = worldType(info.GetIsolate());
141 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); 141 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate());
142 v8::Handle<v8::FunctionTemplate> privateTemplate = data->privateTemplate(cur rentWorldType, &privateTemplateUniqueKey, TestActiveDOMObjectV8Internal::postMes sageMethodCallback, v8Undefined(), v8::Signature::New(V8PerIsolateData::from(inf o.GetIsolate())->rawTemplate(&V8TestActiveDOMObject::wrapperTypeInfo, currentWor ldType)), 1); 142 v8::Handle<v8::FunctionTemplate> privateTemplate = data->privateTemplate(cur rentWorldType, &privateTemplateUniqueKey, TestActiveDOMObjectV8Internal::postMes sageMethodCallback, v8Undefined(), v8::Signature::New(V8PerIsolateData::from(inf o.GetIsolate())->rawTemplate(&V8TestActiveDOMObject::wrapperTypeInfo, currentWor ldType)), 1);
143 143
144 v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8 TestActiveDOMObject::GetTemplate(info.GetIsolate(), currentWorldType)); 144 v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8 TestActiveDOMObject::GetTemplate(info.GetIsolate(), currentWorldType));
145 if (holder.IsEmpty()) { 145 if (holder.IsEmpty()) {
146 // can only reach here by 'object.__proto__.func', and it should passed 146 // can only reach here by 'object.__proto__.func', and it should passed
147 // domain security check already 147 // domain security check already
148 v8SetReturnValue(info, privateTemplate->GetFunction()); 148 v8SetReturnValue(info, privateTemplate->GetFunction());
149 return; 149 return;
150 } 150 }
151 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(holder); 151 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(holder);
152 if (!BindingSecurity::shouldAllowAccessToFrame(imp->frame(), DoNotReportSecu rityError)) { 152 if (!BindingSecurity::shouldAllowAccessToFrame(imp->frame(), DoNotReportSecu rityError)) {
153 static const char* sharedTemplateUniqueKey = "postMessageSharedTemplate" ; 153 static int sharedTemplateUniqueKey;
154 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->privateTemplate( currentWorldType, &sharedTemplateUniqueKey, TestActiveDOMObjectV8Internal::postM essageMethodCallback, v8Undefined(), v8::Signature::New(V8PerIsolateData::from(i nfo.GetIsolate())->rawTemplate(&V8TestActiveDOMObject::wrapperTypeInfo, currentW orldType)), 1); 154 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->privateTemplate( currentWorldType, &sharedTemplateUniqueKey, TestActiveDOMObjectV8Internal::postM essageMethodCallback, v8Undefined(), v8::Signature::New(V8PerIsolateData::from(i nfo.GetIsolate())->rawTemplate(&V8TestActiveDOMObject::wrapperTypeInfo, currentW orldType)), 1);
155 v8SetReturnValue(info, sharedTemplate->GetFunction()); 155 v8SetReturnValue(info, sharedTemplate->GetFunction());
156 return; 156 return;
157 } 157 }
158 158
159 v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(name); 159 v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(name);
160 if (!hiddenValue.IsEmpty()) { 160 if (!hiddenValue.IsEmpty()) {
161 v8SetReturnValue(info, hiddenValue); 161 v8SetReturnValue(info, hiddenValue);
162 return; 162 return;
163 } 163 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 V8DOMWrapper::associateObjectWithWrapper<V8TestActiveDOMObject>(impl, &wrapp erTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); 268 V8DOMWrapper::associateObjectWithWrapper<V8TestActiveDOMObject>(impl, &wrapp erTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
269 return wrapper; 269 return wrapper;
270 } 270 }
271 271
272 void V8TestActiveDOMObject::derefObject(void* object) 272 void V8TestActiveDOMObject::derefObject(void* object)
273 { 273 {
274 fromInternalPointer(object)->deref(); 274 fromInternalPointer(object)->deref();
275 } 275 }
276 276
277 } // namespace WebCore 277 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/tests/results/V8TestNamedConstructor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698