Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(698)

Side by Side Diff: Source/bindings/v8/custom/V8DocumentCustom.cpp

Issue 304223007: Use auto-rethrowing v8::TryCatch variant (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: make constructors explicit Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/bindings/v8/V8BindingMacros.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8BindingMacros.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698