| 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 { | 436 { |
| 437 if (UNLIKELY(info.Length() < 2)) { | 437 if (UNLIKELY(info.Length() < 2)) { |
| 438 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestTy
pedefs", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsola
te()); | 438 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestTy
pedefs", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsola
te()); |
| 439 return; | 439 return; |
| 440 } | 440 } |
| 441 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, hello, info[0]); | 441 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, hello, info[0]); |
| 442 if (info.Length() <= 1 || !info[1]->IsFunction()) { | 442 if (info.Length() <= 1 || !info[1]->IsFunction()) { |
| 443 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestTy
pedefs", "The callback provided as parameter 2 is not a function."), info.GetIso
late()); | 443 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestTy
pedefs", "The callback provided as parameter 2 is not a function."), info.GetIso
late()); |
| 444 return; | 444 return; |
| 445 } | 445 } |
| 446 RefPtr<TestCallback> testCallback = V8TestCallback::create(info[1], getExecu
tionContext()); | 446 OwnPtr<TestCallback> testCallback = V8TestCallback::create(info[1], getExecu
tionContext()); |
| 447 | 447 |
| 448 RefPtr<TestTypedefs> impl = TestTypedefs::create(hello, testCallback); | 448 RefPtr<TestTypedefs> impl = TestTypedefs::create(hello, testCallback); |
| 449 v8::Handle<v8::Object> wrapper = info.Holder(); | 449 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 450 | 450 |
| 451 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8
TestTypedefs::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration:
:Dependent); | 451 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8
TestTypedefs::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration:
:Dependent); |
| 452 info.GetReturnValue().Set(wrapper); | 452 info.GetReturnValue().Set(wrapper); |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace TestTypedefsV8Internal | 455 } // namespace TestTypedefsV8Internal |
| 456 | 456 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 fromInternalPointer(object)->deref(); | 566 fromInternalPointer(object)->deref(); |
| 567 } | 567 } |
| 568 | 568 |
| 569 template<> | 569 template<> |
| 570 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) | 570 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) |
| 571 { | 571 { |
| 572 return toV8(impl, creationContext, isolate); | 572 return toV8(impl, creationContext, isolate); |
| 573 } | 573 } |
| 574 | 574 |
| 575 } // namespace WebCore | 575 } // namespace WebCore |
| OLD | NEW |