| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 value = V8MediaStream::toNativeWithTypeCheck(m_isolate, v8Value); | 518 value = V8MediaStream::toNativeWithTypeCheck(m_isolate, v8Value); |
| 519 return true; | 519 return true; |
| 520 } | 520 } |
| 521 | 521 |
| 522 bool Dictionary::get(const String& key, RefPtr<EventTarget>& value) const | 522 bool Dictionary::get(const String& key, RefPtr<EventTarget>& value) const |
| 523 { | 523 { |
| 524 v8::Local<v8::Value> v8Value; | 524 v8::Local<v8::Value> v8Value; |
| 525 if (!getKey(key, v8Value)) | 525 if (!getKey(key, v8Value)) |
| 526 return false; | 526 return false; |
| 527 | 527 |
| 528 value = 0; | 528 value = nullptr; |
| 529 // We need to handle a DOMWindow specially, because a DOMWindow wrapper | 529 // We need to handle a DOMWindow specially, because a DOMWindow wrapper |
| 530 // exists on a prototype chain of v8Value. | 530 // exists on a prototype chain of v8Value. |
| 531 if (v8Value->IsObject()) { | 531 if (v8Value->IsObject()) { |
| 532 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value); | 532 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value); |
| 533 v8::Handle<v8::Object> window = wrapper->FindInstanceInPrototypeChain(V8
Window::domTemplate(m_isolate, worldTypeInMainThread(m_isolate))); | 533 v8::Handle<v8::Object> window = wrapper->FindInstanceInPrototypeChain(V8
Window::domTemplate(m_isolate, worldTypeInMainThread(m_isolate))); |
| 534 if (!window.IsEmpty()) { | 534 if (!window.IsEmpty()) { |
| 535 value = toWrapperTypeInfo(window)->toEventTarget(window); | 535 value = toWrapperTypeInfo(window)->toEventTarget(window); |
| 536 return true; | 536 return true; |
| 537 } | 537 } |
| 538 } | 538 } |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 { | 752 { |
| 753 if (forConstructor()) { | 753 if (forConstructor()) { |
| 754 exceptionState().throwTypeError(detail); | 754 exceptionState().throwTypeError(detail); |
| 755 } else { | 755 } else { |
| 756 ASSERT(!methodName().isEmpty()); | 756 ASSERT(!methodName().isEmpty()); |
| 757 exceptionState().throwTypeError(ExceptionMessages::failedToExecute(inter
faceName(), methodName(), detail)); | 757 exceptionState().throwTypeError(ExceptionMessages::failedToExecute(inter
faceName(), methodName(), detail)); |
| 758 } | 758 } |
| 759 } | 759 } |
| 760 | 760 |
| 761 } // namespace WebCore | 761 } // namespace WebCore |
| OLD | NEW |