| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 125 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 126 exceptionState.throwIfNeeded(); | 126 exceptionState.throwIfNeeded(); |
| 127 return; | 127 return; |
| 128 } | 128 } |
| 129 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0])
; | 129 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0])
; |
| 130 V8TRYCATCH_VOID(bool, defaultUndefinedOptionalBooleanArg, info[1]->BooleanVa
lue()); | 130 V8TRYCATCH_VOID(bool, defaultUndefinedOptionalBooleanArg, info[1]->BooleanVa
lue()); |
| 131 V8TRYCATCH_EXCEPTION_VOID(int, defaultUndefinedOptionalLongArg, toInt32(info
[2], exceptionState), exceptionState); | 131 V8TRYCATCH_EXCEPTION_VOID(int, defaultUndefinedOptionalLongArg, toInt32(info
[2], exceptionState), exceptionState); |
| 132 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultUndefinedOpt
ionalStringArg, info[3]); | 132 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultUndefinedOpt
ionalStringArg, info[3]); |
| 133 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultNullStringOp
tionalstringArg, argumentOrNull(info, 4)); | 133 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultNullStringOp
tionalstringArg, argumentOrNull(info, 4)); |
| 134 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstructor::
createForJSConstructor(*document, stringArg, defaultUndefinedOptionalBooleanArg,
defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNull
StringOptionalstringArg, exceptionState); | 134 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstructor::
createForJSConstructor(*document, stringArg, defaultUndefinedOptionalBooleanArg,
defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNull
StringOptionalstringArg, exceptionState); |
| 135 v8::Handle<v8::Object> wrapper = info.Holder(); | |
| 136 if (exceptionState.throwIfNeeded()) | 135 if (exceptionState.throwIfNeeded()) |
| 137 return; | 136 return; |
| 138 | 137 |
| 138 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 139 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor>(im
pl.release(), &V8TestInterfaceNamedConstructorConstructor::wrapperTypeInfo, wrap
per, info.GetIsolate(), WrapperConfiguration::Dependent); | 139 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor>(im
pl.release(), &V8TestInterfaceNamedConstructorConstructor::wrapperTypeInfo, wrap
per, info.GetIsolate(), WrapperConfiguration::Dependent); |
| 140 v8SetReturnValue(info, wrapper); | 140 v8SetReturnValue(info, wrapper); |
| 141 } | 141 } |
| 142 | 142 |
| 143 v8::Handle<v8::FunctionTemplate> V8TestInterfaceNamedConstructorConstructor::dom
Template(v8::Isolate* isolate) | 143 v8::Handle<v8::FunctionTemplate> V8TestInterfaceNamedConstructorConstructor::dom
Template(v8::Isolate* isolate) |
| 144 { | 144 { |
| 145 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 145 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
| 146 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 146 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 147 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); | 147 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); |
| 148 if (!result.IsEmpty()) | 148 if (!result.IsEmpty()) |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 fromInternalPointer(object)->deref(); | 234 fromInternalPointer(object)->deref(); |
| 235 } | 235 } |
| 236 | 236 |
| 237 template<> | 237 template<> |
| 238 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) | 238 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) |
| 239 { | 239 { |
| 240 return toV8(impl, creationContext, isolate); | 240 return toV8(impl, creationContext, isolate); |
| 241 } | 241 } |
| 242 | 242 |
| 243 } // namespace WebCore | 243 } // namespace WebCore |
| OLD | NEW |