| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 throwTypeError("DOM object constructor cannot be called as a function.",
args.GetIsolate()); | 73 throwTypeError("DOM object constructor cannot be called as a function.",
args.GetIsolate()); |
| 74 return; | 74 return; |
| 75 } | 75 } |
| 76 | 76 |
| 77 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { | 77 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { |
| 78 args.GetReturnValue().Set(args.Holder()); | 78 args.GetReturnValue().Set(args.Holder()); |
| 79 return; | 79 return; |
| 80 } | 80 } |
| 81 | 81 |
| 82 Document* document = currentDocument(); | 82 Document* document = currentDocument(); |
| 83 ASSERT(document); |
| 83 | 84 |
| 84 // Make sure the document is added to the DOM Node map. Otherwise, the TestN
amedConstructor instance | 85 // 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. | 86 // may end up being the only node in the map and get garbage-collected prema
turely. |
| 86 toV8(document, args.Holder(), args.GetIsolate()); | 87 toV8(document, args.Holder(), args.GetIsolate()); |
| 87 | 88 |
| 88 if (args.Length() < 1) { | 89 if (args.Length() < 1) { |
| 89 throwNotEnoughArgumentsError(args.GetIsolate()); | 90 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 90 return; | 91 return; |
| 91 } | 92 } |
| 92 ExceptionState es(args.GetIsolate()); | 93 ExceptionState es(args.GetIsolate()); |
| 93 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, args[0]); | 94 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, args[0]); |
| 94 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, args[1]); | 95 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, args[1]); |
| 95 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str3, argumentOrNul
l(args, 2)); | 96 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str3, argumentOrNul
l(args, 2)); |
| 96 | 97 |
| 97 RefPtr<TestNamedConstructor> impl = TestNamedConstructor::createForJSConstru
ctor(document, str1, str2, str3, es); | 98 RefPtr<TestNamedConstructor> impl = TestNamedConstructor::createForJSConstru
ctor(*document, str1, str2, str3, es); |
| 98 v8::Handle<v8::Object> wrapper = args.Holder(); | 99 v8::Handle<v8::Object> wrapper = args.Holder(); |
| 99 if (es.throwIfNeeded()) | 100 if (es.throwIfNeeded()) |
| 100 return; | 101 return; |
| 101 | 102 |
| 102 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl.releas
e(), &V8TestNamedConstructorConstructor::info, wrapper, args.GetIsolate(), Wrapp
erConfiguration::Dependent); | 103 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl.releas
e(), &V8TestNamedConstructorConstructor::info, wrapper, args.GetIsolate(), Wrapp
erConfiguration::Dependent); |
| 103 args.GetReturnValue().Set(wrapper); | 104 args.GetReturnValue().Set(wrapper); |
| 104 } | 105 } |
| 105 | 106 |
| 106 v8::Handle<v8::FunctionTemplate> V8TestNamedConstructorConstructor::GetTemplate(
v8::Isolate* isolate, WrapperWorldType currentWorldType) | 107 v8::Handle<v8::FunctionTemplate> V8TestNamedConstructorConstructor::GetTemplate(
v8::Isolate* isolate, WrapperWorldType currentWorldType) |
| 107 { | 108 { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl, &info
, wrapper, isolate, WrapperConfiguration::Dependent); | 192 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl, &info
, wrapper, isolate, WrapperConfiguration::Dependent); |
| 192 return wrapper; | 193 return wrapper; |
| 193 } | 194 } |
| 194 | 195 |
| 195 void V8TestNamedConstructor::derefObject(void* object) | 196 void V8TestNamedConstructor::derefObject(void* object) |
| 196 { | 197 { |
| 197 fromInternalPointer(object)->deref(); | 198 fromInternalPointer(object)->deref(); |
| 198 } | 199 } |
| 199 | 200 |
| 200 } // namespace WebCore | 201 } // namespace WebCore |
| OLD | NEW |