| 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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 | 671 |
| 672 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 672 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 673 { | 673 { |
| 674 if (UNLIKELY(info.Length() < 1)) { | 674 if (UNLIKELY(info.Length() < 1)) { |
| 675 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestIn
terface", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsol
ate()); | 675 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestIn
terface", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsol
ate()); |
| 676 return; | 676 return; |
| 677 } | 677 } |
| 678 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 678 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
| 679 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, info[0]); | 679 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, info[0]); |
| 680 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, info[1]); | 680 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, info[1]); |
| 681 | |
| 682 ExecutionContext* context = getExecutionContext(); | 681 ExecutionContext* context = getExecutionContext(); |
| 683 RefPtr<TestInterface> impl = TestInterface::create(context, str1, str2, exce
ptionState); | 682 RefPtr<TestInterface> impl = TestInterface::create(context, str1, str2, exce
ptionState); |
| 684 v8::Handle<v8::Object> wrapper = info.Holder(); | 683 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 685 if (exceptionState.throwIfNeeded()) | 684 if (exceptionState.throwIfNeeded()) |
| 686 return; | 685 return; |
| 687 | 686 |
| 688 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl.release(), &V
8TestInterface::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguratio
n::Dependent); | 687 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl.release(), &V
8TestInterface::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguratio
n::Dependent); |
| 689 info.GetReturnValue().Set(wrapper); | 688 info.GetReturnValue().Set(wrapper); |
| 690 } | 689 } |
| 691 | 690 |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 } | 987 } |
| 989 | 988 |
| 990 template<> | 989 template<> |
| 991 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 990 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
| 992 { | 991 { |
| 993 return toV8(impl, creationContext, isolate); | 992 return toV8(impl, creationContext, isolate); |
| 994 } | 993 } |
| 995 | 994 |
| 996 } // namespace WebCore | 995 } // namespace WebCore |
| 997 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 996 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| OLD | NEW |