| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 toV8(document, info.Holder(), info.GetIsolate()); | 97 toV8(document, info.Holder(), info.GetIsolate()); |
| 98 | 98 |
| 99 if (UNLIKELY(info.Length() < 1)) { | 99 if (UNLIKELY(info.Length() < 1)) { |
| 100 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceNamedC
onstructor2", ExceptionMessages::notEnoughArguments(1, info.Length())), info.Get
Isolate()); | 100 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceNamedC
onstructor2", ExceptionMessages::notEnoughArguments(1, info.Length())), info.Get
Isolate()); |
| 101 return; | 101 return; |
| 102 } | 102 } |
| 103 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0])
; | 103 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0])
; |
| 104 RefPtr<TestInterfaceNamedConstructor2> impl = TestInterfaceNamedConstructor2
::createForJSConstructor(*document, stringArg); | 104 RefPtr<TestInterfaceNamedConstructor2> impl = TestInterfaceNamedConstructor2
::createForJSConstructor(*document, stringArg); |
| 105 v8::Handle<v8::Object> wrapper = info.Holder(); | 105 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 106 | 106 |
| 107 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor2>(i
mpl.release(), &V8TestInterfaceNamedConstructor2Constructor::wrapperTypeInfo, wr
apper, info.GetIsolate(), WrapperConfiguration::Dependent); | 107 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor2>(i
mpl.release(), &V8TestInterfaceNamedConstructor2Constructor::wrapperTypeInfo, wr
apper, info.GetIsolate(), WrapperConfiguration::Independent); |
| 108 v8SetReturnValue(info, wrapper); | 108 v8SetReturnValue(info, wrapper); |
| 109 } | 109 } |
| 110 | 110 |
| 111 v8::Handle<v8::FunctionTemplate> V8TestInterfaceNamedConstructor2Constructor::do
mTemplate(v8::Isolate* isolate) | 111 v8::Handle<v8::FunctionTemplate> V8TestInterfaceNamedConstructor2Constructor::do
mTemplate(v8::Isolate* isolate) |
| 112 { | 112 { |
| 113 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 113 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
| 114 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 114 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 115 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); | 115 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); |
| 116 if (!result.IsEmpty()) | 116 if (!result.IsEmpty()) |
| 117 return result; | 117 return result; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 fromInternalPointer(object)->deref(); | 197 fromInternalPointer(object)->deref(); |
| 198 } | 198 } |
| 199 | 199 |
| 200 template<> | 200 template<> |
| 201 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor2* impl, v8::Han
dle<v8::Object> creationContext, v8::Isolate* isolate) | 201 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor2* impl, v8::Han
dle<v8::Object> creationContext, v8::Isolate* isolate) |
| 202 { | 202 { |
| 203 return toV8(impl, creationContext, isolate); | 203 return toV8(impl, creationContext, isolate); |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace WebCore | 206 } // namespace WebCore |
| OLD | NEW |