| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 throwUninformativeAndGenericTypeError(isolate); | 265 throwUninformativeAndGenericTypeError(isolate); |
| 266 return; | 266 return; |
| 267 } | 267 } |
| 268 | 268 |
| 269 Document* document = V8Document::toNative(info.Callee()->GetHiddenValue(V8Hi
ddenPropertyName::customElementDocument(isolate)).As<v8::Object>()); | 269 Document* document = V8Document::toNative(info.Callee()->GetHiddenValue(V8Hi
ddenPropertyName::customElementDocument(isolate)).As<v8::Object>()); |
| 270 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, namespaceURI, info.
Callee()->GetHiddenValue(V8HiddenPropertyName::customElementNamespaceURI(isolate
))); | 270 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, namespaceURI, info.
Callee()->GetHiddenValue(V8HiddenPropertyName::customElementNamespaceURI(isolate
))); |
| 271 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, tagName, info.Calle
e()->GetHiddenValue(V8HiddenPropertyName::customElementTagName(isolate))); | 271 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, tagName, info.Calle
e()->GetHiddenValue(V8HiddenPropertyName::customElementTagName(isolate))); |
| 272 v8::Handle<v8::Value> maybeType = info.Callee()->GetHiddenValue(V8HiddenProp
ertyName::customElementType(isolate)); | 272 v8::Handle<v8::Value> maybeType = info.Callee()->GetHiddenValue(V8HiddenProp
ertyName::customElementType(isolate)); |
| 273 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, maybeType); | 273 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, maybeType); |
| 274 | 274 |
| 275 ExceptionState es(info.GetIsolate()); | 275 ExceptionState es(info.Holder(), info.GetIsolate()); |
| 276 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 276 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 277 RefPtr<Element> element = document->createElementNS(namespaceURI, tagName, m
aybeType->IsNull() ? nullAtom : type, es); | 277 RefPtr<Element> element = document->createElementNS(namespaceURI, tagName, m
aybeType->IsNull() ? nullAtom : type, es); |
| 278 if (es.throwIfNeeded()) | 278 if (es.throwIfNeeded()) |
| 279 return; | 279 return; |
| 280 v8SetReturnValueFast(info, element.release(), document); | 280 v8SetReturnValueFast(info, element.release(), document); |
| 281 } | 281 } |
| 282 | 282 |
| 283 } // namespace WebCore | 283 } // namespace WebCore |
| OLD | NEW |