| 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, |
| 11 but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 Library General Public License for more details. | 13 Library General Public License for more details. |
| 14 | 14 |
| 15 You should have received a copy of the GNU Library General Public License | 15 You should have received a copy of the GNU Library General Public License |
| 16 along with this library; see the file COPYING.LIB. If not, write to | 16 along with this library; see the file COPYING.LIB. If not, write to |
| 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 18 Boston, MA 02111-1307, USA. | 18 Boston, MA 02111-1307, USA. |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #include "config.h" | 21 #include "config.h" |
| 22 #include "V8TestNamedConstructor.h" | 22 #include "V8TestNamedConstructor.h" |
| 23 | 23 |
| 24 #include "RuntimeEnabledFeatures.h" | 24 #include "RuntimeEnabledFeatures.h" |
| 25 #include "V8Document.h" | 25 #include "V8Document.h" |
| 26 #include "bindings/v8/ExceptionState.h" |
| 26 #include "bindings/v8/ScriptController.h" | 27 #include "bindings/v8/ScriptController.h" |
| 27 #include "bindings/v8/V8Binding.h" | 28 #include "bindings/v8/V8Binding.h" |
| 28 #include "bindings/v8/V8DOMConfiguration.h" | 29 #include "bindings/v8/V8DOMConfiguration.h" |
| 29 #include "bindings/v8/V8DOMWrapper.h" | 30 #include "bindings/v8/V8DOMWrapper.h" |
| 30 #include "bindings/v8/V8ObjectConstructor.h" | 31 #include "bindings/v8/V8ObjectConstructor.h" |
| 31 #include "core/dom/ContextFeatures.h" | 32 #include "core/dom/ContextFeatures.h" |
| 32 #include "core/dom/Document.h" | 33 #include "core/dom/Document.h" |
| 33 #include "core/dom/ExceptionCode.h" | |
| 34 #include "core/page/Frame.h" | 34 #include "core/page/Frame.h" |
| 35 #include "core/platform/chromium/TraceEvent.h" | 35 #include "core/platform/chromium/TraceEvent.h" |
| 36 #include "wtf/UnusedParam.h" | 36 #include "wtf/UnusedParam.h" |
| 37 | 37 |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 static void initializeScriptWrappableForInterface(TestNamedConstructor* object) | 40 static void initializeScriptWrappableForInterface(TestNamedConstructor* object) |
| 41 { | 41 { |
| 42 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 42 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
| 43 ScriptWrappable::setTypeInfoInObject(object, &V8TestNamedConstructor::in
fo); | 43 ScriptWrappable::setTypeInfoInObject(object, &V8TestNamedConstructor::in
fo); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 Document* document = currentDocument(); | 82 Document* document = currentDocument(); |
| 83 | 83 |
| 84 // Make sure the document is added to the DOM Node map. Otherwise, the TestN
amedConstructor instance | 84 // Make sure the document is added to the DOM Node map. Otherwise, the TestN
amedConstructor instance |
| 85 // may end up being the only node in the map and get garbage-collected prema
turely. | 85 // may end up being the only node in the map and get garbage-collected prema
turely. |
| 86 toV8(document, args.Holder(), args.GetIsolate()); | 86 toV8(document, args.Holder(), args.GetIsolate()); |
| 87 | 87 |
| 88 if (args.Length() < 1) { | 88 if (args.Length() < 1) { |
| 89 throwNotEnoughArgumentsError(args.GetIsolate()); | 89 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 90 return; | 90 return; |
| 91 } | 91 } |
| 92 ExceptionCode ec = 0; | 92 ExceptionState es(args.GetIsolate()); |
| 93 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, args[0]); | 93 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, args[0]); |
| 94 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, args[1]); | 94 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, args[1]); |
| 95 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str3, argumentOrNul
l(args, 2)); | 95 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str3, argumentOrNul
l(args, 2)); |
| 96 | 96 |
| 97 RefPtr<TestNamedConstructor> impl = TestNamedConstructor::createForJSConstru
ctor(document, str1, str2, str3, ec); | 97 RefPtr<TestNamedConstructor> impl = TestNamedConstructor::createForJSConstru
ctor(document, str1, str2, str3, es); |
| 98 v8::Handle<v8::Object> wrapper = args.Holder(); | 98 v8::Handle<v8::Object> wrapper = args.Holder(); |
| 99 if (ec) { | 99 if (es.throwIfNeeded()) |
| 100 setDOMException(ec, args.GetIsolate()); | |
| 101 return; | 100 return; |
| 102 } | |
| 103 | 101 |
| 104 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl.releas
e(), &V8TestNamedConstructorConstructor::info, wrapper, args.GetIsolate(), Wrapp
erConfiguration::Dependent); | 102 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl.releas
e(), &V8TestNamedConstructorConstructor::info, wrapper, args.GetIsolate(), Wrapp
erConfiguration::Dependent); |
| 105 args.GetReturnValue().Set(wrapper); | 103 args.GetReturnValue().Set(wrapper); |
| 106 } | 104 } |
| 107 | 105 |
| 108 v8::Handle<v8::FunctionTemplate> V8TestNamedConstructorConstructor::GetTemplate(
v8::Isolate* isolate, WrapperWorldType currentWorldType) | 106 v8::Handle<v8::FunctionTemplate> V8TestNamedConstructorConstructor::GetTemplate(
v8::Isolate* isolate, WrapperWorldType currentWorldType) |
| 109 { | 107 { |
| 110 static v8::Persistent<v8::FunctionTemplate> cachedTemplate; | 108 static v8::Persistent<v8::FunctionTemplate> cachedTemplate; |
| 111 if (!cachedTemplate.IsEmpty()) | 109 if (!cachedTemplate.IsEmpty()) |
| 112 return v8::Local<v8::FunctionTemplate>::New(isolate, cachedTemplate); | 110 return v8::Local<v8::FunctionTemplate>::New(isolate, cachedTemplate); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 installPerContextProperties(wrapper, impl.get(), isolate); | 181 installPerContextProperties(wrapper, impl.get(), isolate); |
| 184 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl, &info
, wrapper, isolate, WrapperConfiguration::Dependent); | 182 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl, &info
, wrapper, isolate, WrapperConfiguration::Dependent); |
| 185 return wrapper; | 183 return wrapper; |
| 186 } | 184 } |
| 187 void V8TestNamedConstructor::derefObject(void* object) | 185 void V8TestNamedConstructor::derefObject(void* object) |
| 188 { | 186 { |
| 189 fromInternalPointer(object)->deref(); | 187 fromInternalPointer(object)->deref(); |
| 190 } | 188 } |
| 191 | 189 |
| 192 } // namespace WebCore | 190 } // namespace WebCore |
| OLD | NEW |