| 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 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 667 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 668 } | 668 } |
| 669 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 669 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| 670 | 670 |
| 671 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 671 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 672 { | 672 { |
| 673 if (UNLIKELY(info.Length() < 1)) { | 673 if (UNLIKELY(info.Length() < 1)) { |
| 674 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestIn
terface", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsol
ate()); | 674 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestIn
terface", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsol
ate()); |
| 675 return; | 675 return; |
| 676 } | 676 } |
| 677 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 677 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rface", info.Holder(), info.GetIsolate()); |
| 678 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, info[0]); | 678 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, info[0]); |
| 679 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, info[1]); | 679 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, info[1]); |
| 680 ExecutionContext* context = getExecutionContext(); | 680 ExecutionContext* context = getExecutionContext(); |
| 681 RefPtr<TestInterface> impl = TestInterface::create(context, str1, str2, exce
ptionState); | 681 RefPtr<TestInterface> impl = TestInterface::create(context, str1, str2, exce
ptionState); |
| 682 v8::Handle<v8::Object> wrapper = info.Holder(); | 682 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 683 if (exceptionState.throwIfNeeded()) | 683 if (exceptionState.throwIfNeeded()) |
| 684 return; | 684 return; |
| 685 | 685 |
| 686 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl.release(), &V
8TestInterface::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguratio
n::Dependent); | 686 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl.release(), &V
8TestInterface::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguratio
n::Dependent); |
| 687 v8SetReturnValue(info, wrapper); | 687 v8SetReturnValue(info, wrapper); |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 } | 983 } |
| 984 | 984 |
| 985 template<> | 985 template<> |
| 986 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 986 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
| 987 { | 987 { |
| 988 return toV8(impl, creationContext, isolate); | 988 return toV8(impl, creationContext, isolate); |
| 989 } | 989 } |
| 990 | 990 |
| 991 } // namespace WebCore | 991 } // namespace WebCore |
| 992 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 992 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| OLD | NEW |