| 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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 return true; | 642 return true; |
| 643 | 643 |
| 644 if (!v8Value->IsArray()) { | 644 if (!v8Value->IsArray()) { |
| 645 context.throwTypeError(ExceptionMessages::notASequenceTypeProperty(key))
; | 645 context.throwTypeError(ExceptionMessages::notASequenceTypeProperty(key))
; |
| 646 return false; | 646 return false; |
| 647 } | 647 } |
| 648 | 648 |
| 649 return get(key, value); | 649 return get(key, value); |
| 650 } | 650 } |
| 651 | 651 |
| 652 bool Dictionary::get(const String& key, RefPtr<DOMError>& value) const | 652 bool Dictionary::get(const String& key, RefPtrWillBeRawPtr<DOMError>& value) con
st |
| 653 { | 653 { |
| 654 v8::Local<v8::Value> v8Value; | 654 v8::Local<v8::Value> v8Value; |
| 655 if (!getKey(key, v8Value)) | 655 if (!getKey(key, v8Value)) |
| 656 return false; | 656 return false; |
| 657 | 657 |
| 658 DOMError* error = 0; | 658 DOMError* error = 0; |
| 659 if (v8Value->IsObject()) { | 659 if (v8Value->IsObject()) { |
| 660 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value); | 660 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value); |
| 661 v8::Handle<v8::Object> domError = wrapper->FindInstanceInPrototypeChain(
V8DOMError::domTemplate(m_isolate, worldType(m_isolate))); | 661 v8::Handle<v8::Object> domError = wrapper->FindInstanceInPrototypeChain(
V8DOMError::domTemplate(m_isolate, worldType(m_isolate))); |
| 662 if (!domError.IsEmpty()) | 662 if (!domError.IsEmpty()) |
| (...skipping 84 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 |