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

Side by Side Diff: Source/bindings/v8/CustomElementConstructorBuilder.cpp

Issue 234403004: Rename V8TRYCATCH_* macros in v8/V8BindingMacros.h (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: BOOL*_BOOL -> BOOL* Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/tests/results/V8TestTypedefs.cpp ('k') | Source/bindings/v8/Dictionary.cpp » ('j') | 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) 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 throwTypeError("DOM object constructor cannot be called as a function.", isolate); 261 throwTypeError("DOM object constructor cannot be called as a function.", isolate);
262 return; 262 return;
263 } 263 }
264 264
265 if (info.Length() > 0) { 265 if (info.Length() > 0) {
266 throwTypeError("This constructor should be called without arguments.", i solate); 266 throwTypeError("This constructor should be called without arguments.", i solate);
267 return; 267 return;
268 } 268 }
269 269
270 Document* document = V8Document::toNative(V8HiddenValue::getHiddenValue(info .GetIsolate(), info.Callee(), V8HiddenValue::customElementDocument(isolate)).As< v8::Object>()); 270 Document* document = V8Document::toNative(V8HiddenValue::getHiddenValue(info .GetIsolate(), info.Callee(), V8HiddenValue::customElementDocument(isolate)).As< v8::Object>());
271 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, namespaceURI, V8Hid denValue::getHiddenValue(isolate, info.Callee(), V8HiddenValue::customElementNam espaceURI(isolate))); 271 TOSTRING_VOID(V8StringResource<>, namespaceURI, V8HiddenValue::getHiddenValu e(isolate, info.Callee(), V8HiddenValue::customElementNamespaceURI(isolate)));
272 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, tagName, V8HiddenVa lue::getHiddenValue(isolate, info.Callee(), V8HiddenValue::customElementTagName( isolate))); 272 TOSTRING_VOID(V8StringResource<>, tagName, V8HiddenValue::getHiddenValue(iso late, info.Callee(), V8HiddenValue::customElementTagName(isolate)));
273 v8::Handle<v8::Value> maybeType = V8HiddenValue::getHiddenValue(info.GetIsol ate(), info.Callee(), V8HiddenValue::customElementType(isolate)); 273 v8::Handle<v8::Value> maybeType = V8HiddenValue::getHiddenValue(info.GetIsol ate(), info.Callee(), V8HiddenValue::customElementType(isolate));
274 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, maybeType); 274 TOSTRING_VOID(V8StringResource<>, type, maybeType);
275 275
276 ExceptionState exceptionState(ExceptionState::ConstructionContext, "CustomEl ement", info.Holder(), info.GetIsolate()); 276 ExceptionState exceptionState(ExceptionState::ConstructionContext, "CustomEl ement", info.Holder(), info.GetIsolate());
277 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 277 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
278 RefPtr<Element> element = document->createElementNS(namespaceURI, tagName, m aybeType->IsNull() ? nullAtom : type, exceptionState); 278 RefPtr<Element> element = document->createElementNS(namespaceURI, tagName, m aybeType->IsNull() ? nullAtom : type, exceptionState);
279 if (exceptionState.throwIfNeeded()) 279 if (exceptionState.throwIfNeeded())
280 return; 280 return;
281 v8SetReturnValueFast(info, element.release(), document); 281 v8SetReturnValueFast(info, element.release(), document);
282 } 282 }
283 283
284 } // namespace WebCore 284 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestTypedefs.cpp ('k') | Source/bindings/v8/Dictionary.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698