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