| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2007-2009 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 void V8Document::createEventMethodCustom(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 90 void V8Document::createEventMethodCustom(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
| 91 { | 91 { |
| 92 ExceptionState exceptionState(ExceptionState::ExecutionContext, "createEvent
", "Document", info.Holder(), info.GetIsolate()); | 92 ExceptionState exceptionState(ExceptionState::ExecutionContext, "createEvent
", "Document", info.Holder(), info.GetIsolate()); |
| 93 if (UNLIKELY(info.Length() < 1)) { | 93 if (UNLIKELY(info.Length() < 1)) { |
| 94 throwMinimumArityTypeError(exceptionState, 1, info.Length()); | 94 throwMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 95 return; | 95 return; |
| 96 } | 96 } |
| 97 Document* impl = V8Document::toNative(info.Holder()); | 97 Document* impl = V8Document::toNative(info.Holder()); |
| 98 V8StringResource<> eventType; | 98 V8StringResource<> eventType; |
| 99 { | 99 { |
| 100 TOSTRING_VOID_INTERNAL_NOTRYCATCH(eventType, info[0]); | 100 TOSTRING_VOID_INTERNAL(eventType, info[0]); |
| 101 } | 101 } |
| 102 RefPtrWillBeRawPtr<Event> result = createEventModules(eventType, exceptionSt
ate); | 102 RefPtrWillBeRawPtr<Event> result = createEventModules(eventType, exceptionSt
ate); |
| 103 if (exceptionState.hadException()) { | 103 if (exceptionState.hadException()) { |
| 104 exceptionState.throwIfNeeded(); | 104 exceptionState.throwIfNeeded(); |
| 105 return; | 105 return; |
| 106 } | 106 } |
| 107 v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl); | 107 v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl); |
| 108 } | 108 } |
| 109 | 109 |
| 110 } // namespace WebCore | 110 } // namespace WebCore |
| OLD | NEW |