| 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 "V8TestInterfaceEmpty.h" | 34 #include "V8TestInterfaceEmpty.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(TestInterfaceEmpty* object) | 46 static void initializeScriptWrappableForInterface(TestInterfaceEmpty* object) |
| 46 { | 47 { |
| 47 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 48 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
| 48 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfaceEmpty::wrap
perTypeInfo); | 49 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfaceEmpty::wrap
perTypeInfo); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 63 | 64 |
| 64 namespace WebCore { | 65 namespace WebCore { |
| 65 const WrapperTypeInfo V8TestInterfaceEmpty::wrapperTypeInfo = { gin::kEmbedderBl
ink, V8TestInterfaceEmpty::domTemplate, V8TestInterfaceEmpty::derefObject, 0, 0,
0, V8TestInterfaceEmpty::installPerContextEnabledMethods, 0, WrapperTypeObjectP
rototype }; | 66 const WrapperTypeInfo V8TestInterfaceEmpty::wrapperTypeInfo = { gin::kEmbedderBl
ink, V8TestInterfaceEmpty::domTemplate, V8TestInterfaceEmpty::derefObject, 0, 0,
0, V8TestInterfaceEmpty::installPerContextEnabledMethods, 0, WrapperTypeObjectP
rototype }; |
| 66 | 67 |
| 67 namespace TestInterfaceEmptyV8Internal { | 68 namespace TestInterfaceEmptyV8Internal { |
| 68 | 69 |
| 69 template <typename T> void V8_USE(T) { } | 70 template <typename T> void V8_USE(T) { } |
| 70 | 71 |
| 71 } // namespace TestInterfaceEmptyV8Internal | 72 } // namespace TestInterfaceEmptyV8Internal |
| 72 | 73 |
| 73 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceEmptyTemplate(v8
::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWo
rldType currentWorldType) | 74 static void configureV8TestInterfaceEmptyTemplate(v8::Handle<v8::FunctionTemplat
e> 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, "TestInterfaceEmpty", v8::Local<v8::FunctionTemplate>(), V8TestInterfaceEmp
ty::internalFieldCount, | 79 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "TestInterfaceEmpty", v8::Local<v8::FunctionTemplate>(), V8TestInterfaceEmp
ty::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> V8TestInterfaceEmpty::domTemplate(v8::Isolate*
isolate, WrapperWorldType currentWorldType) | 91 v8::Handle<v8::FunctionTemplate> V8TestInterfaceEmpty::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 ConfigureV8TestInterfaceEmptyTemplate(data->rawDOMTemplate(&wrapperTypeI
nfo, currentWorldType), isolate, currentWorldType); | 101 configureV8TestInterfaceEmptyTemplate(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 V8TestInterfaceEmpty::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolat
e* isolate, WrapperWorldType currentWorldType) | 106 bool V8TestInterfaceEmpty::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolat
e* 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 V8TestInterfaceEmpty::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue,
v8::Isolate* isolate) | 111 bool V8TestInterfaceEmpty::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(TestInterfaceEmpty* impl, v8::Handle<v8::Obje
ct> creationContext, v8::Isolate* isolate) | 144 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEmpty* impl, v8::Handle<v8::Obje
ct> 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 |