| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 { | 314 { |
| 315 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 315 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 316 SupportTestInterfaceV8Internal::supplementalMethod1Method(info); | 316 SupportTestInterfaceV8Internal::supplementalMethod1Method(info); |
| 317 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 317 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 318 } | 318 } |
| 319 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 319 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| 320 | 320 |
| 321 #if ENABLE(Condition11) || ENABLE(Condition12) | 321 #if ENABLE(Condition11) || ENABLE(Condition12) |
| 322 static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 322 static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 323 { | 323 { |
| 324 ExceptionState exceptionState(ExceptionState::ExecutionContext, "supplementa
lMethod2", "SupportTestInterface", info.Holder(), info.GetIsolate()); |
| 324 if (UNLIKELY(info.Length() < 2)) { | 325 if (UNLIKELY(info.Length() < 2)) { |
| 325 throwTypeError(ExceptionMessages::failedToExecute("supplementalMethod2",
"SupportTestInterface", ExceptionMessages::notEnoughArguments(2, info.Length())
), info.GetIsolate()); | 326 throwTypeError(ExceptionMessages::failedToExecute("supplementalMethod2",
"SupportTestInterface", ExceptionMessages::notEnoughArguments(2, info.Length())
), info.GetIsolate()); |
| 326 return; | 327 return; |
| 327 } | 328 } |
| 328 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder()); | 329 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder()); |
| 329 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | |
| 330 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); | 330 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
| 331 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[1], info.Ge
tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(info[1])) : 0); | 331 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[1], info.Ge
tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(info[1])) : 0); |
| 332 ExecutionContext* scriptContext = getExecutionContext(); | 332 ExecutionContext* scriptContext = getExecutionContext(); |
| 333 RefPtr<TestObj> result = SupportTestPartialInterface::supplementalMethod2(sc
riptContext, imp, strArg, objArg, exceptionState); | 333 RefPtr<TestObj> result = SupportTestPartialInterface::supplementalMethod2(sc
riptContext, imp, strArg, objArg, exceptionState); |
| 334 if (exceptionState.throwIfNeeded()) | 334 if (exceptionState.throwIfNeeded()) |
| 335 return; | 335 return; |
| 336 v8SetReturnValue(info, result.release()); | 336 v8SetReturnValue(info, result.release()); |
| 337 } | 337 } |
| 338 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 338 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| 339 | 339 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 fromInternalPointer(object)->deref(); | 511 fromInternalPointer(object)->deref(); |
| 512 } | 512 } |
| 513 | 513 |
| 514 template<> | 514 template<> |
| 515 v8::Handle<v8::Value> toV8NoInline(SupportTestInterface* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) | 515 v8::Handle<v8::Value> toV8NoInline(SupportTestInterface* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) |
| 516 { | 516 { |
| 517 return toV8(impl, creationContext, isolate); | 517 return toV8(impl, creationContext, isolate); |
| 518 } | 518 } |
| 519 | 519 |
| 520 } // namespace WebCore | 520 } // namespace WebCore |
| OLD | NEW |