| 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 25 matching lines...) Expand all Loading... |
| 36 #include "bindings/core/v8/V8MediaKeyError.h" | 36 #include "bindings/core/v8/V8MediaKeyError.h" |
| 37 #include "bindings/core/v8/V8MessagePort.h" | 37 #include "bindings/core/v8/V8MessagePort.h" |
| 38 #include "bindings/core/v8/V8Path2D.h" | 38 #include "bindings/core/v8/V8Path2D.h" |
| 39 #include "bindings/core/v8/V8Storage.h" | 39 #include "bindings/core/v8/V8Storage.h" |
| 40 #include "bindings/core/v8/V8TextTrack.h" | 40 #include "bindings/core/v8/V8TextTrack.h" |
| 41 #include "bindings/core/v8/V8VoidCallback.h" | 41 #include "bindings/core/v8/V8VoidCallback.h" |
| 42 #include "bindings/core/v8/V8Window.h" | 42 #include "bindings/core/v8/V8Window.h" |
| 43 #include "bindings/core/v8/custom/V8ArrayBufferViewCustom.h" | 43 #include "bindings/core/v8/custom/V8ArrayBufferViewCustom.h" |
| 44 #include "bindings/core/v8/custom/V8Uint8ArrayCustom.h" | 44 #include "bindings/core/v8/custom/V8Uint8ArrayCustom.h" |
| 45 #include "bindings/modules/v8/V8Gamepad.h" | 45 #include "bindings/modules/v8/V8Gamepad.h" |
| 46 #include "bindings/modules/v8/V8HeaderMap.h" | |
| 47 #include "bindings/modules/v8/V8Headers.h" | 46 #include "bindings/modules/v8/V8Headers.h" |
| 48 #include "bindings/modules/v8/V8IDBKeyRange.h" | 47 #include "bindings/modules/v8/V8IDBKeyRange.h" |
| 49 #include "bindings/modules/v8/V8MIDIPort.h" | 48 #include "bindings/modules/v8/V8MIDIPort.h" |
| 50 #include "bindings/modules/v8/V8MediaStream.h" | 49 #include "bindings/modules/v8/V8MediaStream.h" |
| 51 #include "bindings/modules/v8/V8SpeechRecognitionResult.h" | 50 #include "bindings/modules/v8/V8SpeechRecognitionResult.h" |
| 52 #include "bindings/modules/v8/V8SpeechRecognitionResultList.h" | 51 #include "bindings/modules/v8/V8SpeechRecognitionResultList.h" |
| 53 #include "core/html/track/TrackBase.h" | 52 #include "core/html/track/TrackBase.h" |
| 54 #include "modules/gamepad/Gamepad.h" | 53 #include "modules/gamepad/Gamepad.h" |
| 55 #include "modules/indexeddb/IDBKeyRange.h" | 54 #include "modules/indexeddb/IDBKeyRange.h" |
| 56 #include "modules/mediastream/MediaStream.h" | 55 #include "modules/mediastream/MediaStream.h" |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 | 577 |
| 579 if (v8Value->IsObject()) { | 578 if (v8Value->IsObject()) { |
| 580 ASSERT(m_isolate); | 579 ASSERT(m_isolate); |
| 581 ASSERT(m_isolate == v8::Isolate::GetCurrent()); | 580 ASSERT(m_isolate == v8::Isolate::GetCurrent()); |
| 582 value = Dictionary(v8Value, m_isolate); | 581 value = Dictionary(v8Value, m_isolate); |
| 583 } | 582 } |
| 584 | 583 |
| 585 return true; | 584 return true; |
| 586 } | 585 } |
| 587 | 586 |
| 588 bool Dictionary::get(const String& key, RefPtr<HeaderMap>& value) const | |
| 589 { | |
| 590 v8::Local<v8::Value> v8Value; | |
| 591 if (!getKey(key, v8Value)) | |
| 592 return false; | |
| 593 | |
| 594 value = V8HeaderMap::toNativeWithTypeCheck(m_isolate, v8Value); | |
| 595 return true; | |
| 596 } | |
| 597 | |
| 598 bool Dictionary::get(const String& key, RefPtr<Headers>& value) const | 587 bool Dictionary::get(const String& key, RefPtr<Headers>& value) const |
| 599 { | 588 { |
| 600 v8::Local<v8::Value> v8Value; | 589 v8::Local<v8::Value> v8Value; |
| 601 if (!getKey(key, v8Value)) | 590 if (!getKey(key, v8Value)) |
| 602 return false; | 591 return false; |
| 603 | 592 |
| 604 value = V8Headers::toNativeWithTypeCheck(m_isolate, v8Value); | 593 value = V8Headers::toNativeWithTypeCheck(m_isolate, v8Value); |
| 605 return true; | 594 return true; |
| 606 } | 595 } |
| 607 | 596 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 | 787 |
| 799 return *this; | 788 return *this; |
| 800 } | 789 } |
| 801 | 790 |
| 802 void Dictionary::ConversionContext::throwTypeError(const String& detail) | 791 void Dictionary::ConversionContext::throwTypeError(const String& detail) |
| 803 { | 792 { |
| 804 exceptionState().throwTypeError(detail); | 793 exceptionState().throwTypeError(detail); |
| 805 } | 794 } |
| 806 | 795 |
| 807 } // namespace WebCore | 796 } // namespace WebCore |
| OLD | NEW |