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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 bool Dictionary::get(const String& key, RefPtr<MediaStream>& value) const | 522 bool Dictionary::get(const String& key, RefPtr<MediaStream>& 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 = V8MediaStream::toNativeWithTypeCheck(m_isolate, v8Value); | 528 value = V8MediaStream::toNativeWithTypeCheck(m_isolate, v8Value); |
529 return true; | 529 return true; |
530 } | 530 } |
531 | 531 |
532 bool Dictionary::get(const String& key, RefPtr<EventTarget>& value) const | 532 bool Dictionary::get(const String& key, RefPtrWillBeMember<EventTarget>& value)
const |
533 { | 533 { |
534 v8::Local<v8::Value> v8Value; | 534 v8::Local<v8::Value> v8Value; |
535 if (!getKey(key, v8Value)) | 535 if (!getKey(key, v8Value)) |
536 return false; | 536 return false; |
537 | 537 |
538 value = nullptr; | 538 value = nullptr; |
539 // We need to handle a DOMWindow specially, because a DOMWindow wrapper | 539 // We need to handle a DOMWindow specially, because a DOMWindow wrapper |
540 // exists on a prototype chain of v8Value. | 540 // exists on a prototype chain of v8Value. |
541 if (v8Value->IsObject()) { | 541 if (v8Value->IsObject()) { |
542 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value); | 542 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 | 747 |
748 return *this; | 748 return *this; |
749 } | 749 } |
750 | 750 |
751 void Dictionary::ConversionContext::throwTypeError(const String& detail) | 751 void Dictionary::ConversionContext::throwTypeError(const String& detail) |
752 { | 752 { |
753 exceptionState().throwTypeError(detail); | 753 exceptionState().throwTypeError(detail); |
754 } | 754 } |
755 | 755 |
756 } // namespace WebCore | 756 } // namespace WebCore |
OLD | NEW |