| 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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 v8::Local<v8::Value> v8Value; | 494 v8::Local<v8::Value> v8Value; |
| 495 if (!getKey(key, v8Value)) | 495 if (!getKey(key, v8Value)) |
| 496 return false; | 496 return false; |
| 497 | 497 |
| 498 value = 0; | 498 value = 0; |
| 499 if (V8SpeechRecognitionError::hasInstance(v8Value, m_isolate)) | 499 if (V8SpeechRecognitionError::hasInstance(v8Value, m_isolate)) |
| 500 value = V8SpeechRecognitionError::toNative(v8::Handle<v8::Object>::Cast(
v8Value)); | 500 value = V8SpeechRecognitionError::toNative(v8::Handle<v8::Object>::Cast(
v8Value)); |
| 501 return true; | 501 return true; |
| 502 } | 502 } |
| 503 | 503 |
| 504 bool Dictionary::get(const String& key, RefPtr<SpeechRecognitionResult>& value)
const | 504 bool Dictionary::get(const String& key, RefPtrWillBeRawPtr<SpeechRecognitionResu
lt>& value) const |
| 505 { | 505 { |
| 506 v8::Local<v8::Value> v8Value; | 506 v8::Local<v8::Value> v8Value; |
| 507 if (!getKey(key, v8Value)) | 507 if (!getKey(key, v8Value)) |
| 508 return false; | 508 return false; |
| 509 | 509 |
| 510 value = 0; | 510 value = 0; |
| 511 if (V8SpeechRecognitionResult::hasInstance(v8Value, m_isolate)) | 511 if (V8SpeechRecognitionResult::hasInstance(v8Value, m_isolate)) |
| 512 value = V8SpeechRecognitionResult::toNative(v8::Handle<v8::Object>::Cast
(v8Value)); | 512 value = V8SpeechRecognitionResult::toNative(v8::Handle<v8::Object>::Cast
(v8Value)); |
| 513 return true; | 513 return true; |
| 514 } | 514 } |
| 515 | 515 |
| 516 bool Dictionary::get(const String& key, RefPtr<SpeechRecognitionResultList>& val
ue) const | 516 bool Dictionary::get(const String& key, RefPtrWillBeRawPtr<SpeechRecognitionResu
ltList>& value) const |
| 517 { | 517 { |
| 518 v8::Local<v8::Value> v8Value; | 518 v8::Local<v8::Value> v8Value; |
| 519 if (!getKey(key, v8Value)) | 519 if (!getKey(key, v8Value)) |
| 520 return false; | 520 return false; |
| 521 | 521 |
| 522 value = 0; | 522 value = 0; |
| 523 if (V8SpeechRecognitionResultList::hasInstance(v8Value, m_isolate)) | 523 if (V8SpeechRecognitionResultList::hasInstance(v8Value, m_isolate)) |
| 524 value = V8SpeechRecognitionResultList::toNative(v8::Handle<v8::Object>::
Cast(v8Value)); | 524 value = V8SpeechRecognitionResultList::toNative(v8::Handle<v8::Object>::
Cast(v8Value)); |
| 525 return true; | 525 return true; |
| 526 } | 526 } |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 { | 770 { |
| 771 if (forConstructor()) { | 771 if (forConstructor()) { |
| 772 exceptionState().throwTypeError(detail); | 772 exceptionState().throwTypeError(detail); |
| 773 } else { | 773 } else { |
| 774 ASSERT(!methodName().isEmpty()); | 774 ASSERT(!methodName().isEmpty()); |
| 775 exceptionState().throwTypeError(ExceptionMessages::failedToExecute(inter
faceName(), methodName(), detail)); | 775 exceptionState().throwTypeError(ExceptionMessages::failedToExecute(inter
faceName(), methodName(), detail)); |
| 776 } | 776 } |
| 777 } | 777 } |
| 778 | 778 |
| 779 } // namespace WebCore | 779 } // namespace WebCore |
| OLD | NEW |