| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! | 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! |
| 32 | 32 |
| 33 #include "config.h" | 33 #include "config.h" |
| 34 #include "V8TestInterfacePython3.h" | 34 #include "V8TestInterfacePython3.h" |
| 35 | 35 |
| 36 #include "RuntimeEnabledFeatures.h" | 36 #include "RuntimeEnabledFeatures.h" |
| 37 #include "bindings/v8/ExceptionState.h" | 37 #include "bindings/v8/ExceptionState.h" |
| 38 #include "bindings/v8/V8DOMConfiguration.h" | 38 #include "bindings/v8/V8DOMConfiguration.h" |
| 39 #include "bindings/v8/V8ObjectConstructor.h" |
| 39 #include "core/dom/ContextFeatures.h" | 40 #include "core/dom/ContextFeatures.h" |
| 40 #include "core/dom/Document.h" | 41 #include "core/dom/Document.h" |
| 41 #include "platform/TraceEvent.h" | 42 #include "platform/TraceEvent.h" |
| 42 | 43 |
| 43 namespace WebCore { | 44 namespace WebCore { |
| 44 | 45 |
| 45 static void initializeScriptWrappableForInterface(TestInterfacePython3* object) | 46 static void initializeScriptWrappableForInterface(TestInterfacePython3* object) |
| 46 { | 47 { |
| 47 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 48 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
| 48 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfacePython3::wr
apperTypeInfo); | 49 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfacePython3::wr
apperTypeInfo); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 63 | 64 |
| 64 namespace WebCore { | 65 namespace WebCore { |
| 65 const WrapperTypeInfo V8TestInterfacePython3::wrapperTypeInfo = { gin::kEmbedder
Blink, V8TestInterfacePython3::domTemplate, V8TestInterfacePython3::derefObject,
0, 0, V8TestInterfacePython3::visitDOMWrapper, V8TestInterfacePython3::installP
erContextEnabledMethods, 0, WrapperTypeObjectPrototype }; | 66 const WrapperTypeInfo V8TestInterfacePython3::wrapperTypeInfo = { gin::kEmbedder
Blink, V8TestInterfacePython3::domTemplate, V8TestInterfacePython3::derefObject,
0, 0, V8TestInterfacePython3::visitDOMWrapper, V8TestInterfacePython3::installP
erContextEnabledMethods, 0, WrapperTypeObjectPrototype }; |
| 66 | 67 |
| 67 namespace TestInterfacePython3V8Internal { | 68 namespace TestInterfacePython3V8Internal { |
| 68 | 69 |
| 69 template <typename T> void V8_USE(T) { } | 70 template <typename T> void V8_USE(T) { } |
| 70 | 71 |
| 71 } // namespace TestInterfacePython3V8Internal | 72 } // namespace TestInterfacePython3V8Internal |
| 72 | 73 |
| 73 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfacePython3Template(
v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, Wrapper
WorldType currentWorldType) | 74 static void configureV8TestInterfacePython3Template(v8::Handle<v8::FunctionTempl
ate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType) |
| 74 { | 75 { |
| 75 functionTemplate->ReadOnlyPrototype(); | 76 functionTemplate->ReadOnlyPrototype(); |
| 76 | 77 |
| 77 v8::Local<v8::Signature> defaultSignature; | 78 v8::Local<v8::Signature> defaultSignature; |
| 78 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "TestInterfacePython3", v8::Local<v8::FunctionTemplate>(), V8TestInterfaceP
ython3::internalFieldCount, | 79 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "TestInterfacePython3", v8::Local<v8::FunctionTemplate>(), V8TestInterfaceP
ython3::internalFieldCount, |
| 79 0, 0, | 80 0, 0, |
| 80 0, 0, | 81 0, 0, |
| 81 0, 0, | 82 0, 0, |
| 82 isolate, currentWorldType); | 83 isolate, currentWorldType); |
| 83 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla
te->InstanceTemplate(); | 84 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla
te->InstanceTemplate(); |
| 84 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl
ate->PrototypeTemplate(); | 85 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl
ate->PrototypeTemplate(); |
| 85 | 86 |
| 86 // Custom toString template | 87 // Custom toString template |
| 87 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin
g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate()); | 88 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin
g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate()); |
| 88 return functionTemplate; | |
| 89 } | 89 } |
| 90 | 90 |
| 91 v8::Handle<v8::FunctionTemplate> V8TestInterfacePython3::domTemplate(v8::Isolate
* isolate, WrapperWorldType currentWorldType) | 91 v8::Handle<v8::FunctionTemplate> V8TestInterfacePython3::domTemplate(v8::Isolate
* isolate, WrapperWorldType currentWorldType) |
| 92 { | 92 { |
| 93 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 93 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 94 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&wrapperTypeInfo); | 94 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&wrapperTypeInfo); |
| 95 if (result != data->templateMap(currentWorldType).end()) | 95 if (result != data->templateMap(currentWorldType).end()) |
| 96 return result->value.newLocal(isolate); | 96 return result->value.newLocal(isolate); |
| 97 | 97 |
| 98 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); | 98 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); |
| 99 v8::EscapableHandleScope handleScope(isolate); | 99 v8::EscapableHandleScope handleScope(isolate); |
| 100 v8::Local<v8::FunctionTemplate> templ = | 100 v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate, V
8ObjectConstructor::isValidConstructorMode); |
| 101 ConfigureV8TestInterfacePython3Template(data->rawDOMTemplate(&wrapperTyp
eInfo, currentWorldType), isolate, currentWorldType); | 101 configureV8TestInterfacePython3Template(templ, isolate, currentWorldType); |
| 102 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v
8::FunctionTemplate>(isolate, templ)); | 102 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v
8::FunctionTemplate>(isolate, templ)); |
| 103 return handleScope.Escape(templ); | 103 return handleScope.Escape(templ); |
| 104 } | 104 } |
| 105 | 105 |
| 106 bool V8TestInterfacePython3::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isol
ate* isolate, WrapperWorldType currentWorldType) | 106 bool V8TestInterfacePython3::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isol
ate* isolate, WrapperWorldType currentWorldType) |
| 107 { | 107 { |
| 108 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, currentWorldType); | 108 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, currentWorldType); |
| 109 } | 109 } |
| 110 | 110 |
| 111 bool V8TestInterfacePython3::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue
, v8::Isolate* isolate) | 111 bool V8TestInterfacePython3::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue
, v8::Isolate* isolate) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 140 fromInternalPointer(object)->deref(); | 140 fromInternalPointer(object)->deref(); |
| 141 } | 141 } |
| 142 | 142 |
| 143 template<> | 143 template<> |
| 144 v8::Handle<v8::Value> toV8NoInline(TestInterfacePython3* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) | 144 v8::Handle<v8::Value> toV8NoInline(TestInterfacePython3* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) |
| 145 { | 145 { |
| 146 return toV8(impl, creationContext, isolate); | 146 return toV8(impl, creationContext, isolate); |
| 147 } | 147 } |
| 148 | 148 |
| 149 } // namespace WebCore | 149 } // namespace WebCore |
| OLD | NEW |