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