| 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 | 572 |
| 574 if (v8Value->IsObject()) { | 573 if (v8Value->IsObject()) { |
| 575 ASSERT(m_isolate); | 574 ASSERT(m_isolate); |
| 576 ASSERT(m_isolate == v8::Isolate::GetCurrent()); | 575 ASSERT(m_isolate == v8::Isolate::GetCurrent()); |
| 577 value = Dictionary(v8Value, m_isolate); | 576 value = Dictionary(v8Value, m_isolate); |
| 578 } | 577 } |
| 579 | 578 |
| 580 return true; | 579 return true; |
| 581 } | 580 } |
| 582 | 581 |
| 583 bool Dictionary::get(const String& key, RefPtr<HeaderMap>& value) const | |
| 584 { | |
| 585 v8::Local<v8::Value> v8Value; | |
| 586 if (!getKey(key, v8Value)) | |
| 587 return false; | |
| 588 | |
| 589 value = V8HeaderMap::toNativeWithTypeCheck(m_isolate, v8Value); | |
| 590 return true; | |
| 591 } | |
| 592 | |
| 593 bool Dictionary::get(const String& key, RefPtr<Headers>& value) const | 582 bool Dictionary::get(const String& key, RefPtr<Headers>& value) const |
| 594 { | 583 { |
| 595 v8::Local<v8::Value> v8Value; | 584 v8::Local<v8::Value> v8Value; |
| 596 if (!getKey(key, v8Value)) | 585 if (!getKey(key, v8Value)) |
| 597 return false; | 586 return false; |
| 598 | 587 |
| 599 value = V8Headers::toNativeWithTypeCheck(m_isolate, v8Value); | 588 value = V8Headers::toNativeWithTypeCheck(m_isolate, v8Value); |
| 600 return true; | 589 return true; |
| 601 } | 590 } |
| 602 | 591 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 | 757 |
| 769 return *this; | 758 return *this; |
| 770 } | 759 } |
| 771 | 760 |
| 772 void Dictionary::ConversionContext::throwTypeError(const String& detail) | 761 void Dictionary::ConversionContext::throwTypeError(const String& detail) |
| 773 { | 762 { |
| 774 exceptionState().throwTypeError(detail); | 763 exceptionState().throwTypeError(detail); |
| 775 } | 764 } |
| 776 | 765 |
| 777 } // namespace WebCore | 766 } // namespace WebCore |
| OLD | NEW |