OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |