Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Side by Side Diff: Source/bindings/v8/Dictionary.cpp

Issue 103083002: Decouple FileSystem and WebSQL callbacks from VoidCallback and it non-refcounted (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/Dictionary.h ('k') | Source/core/html/VoidCallback.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 if (v8Value->IsObject()) { 667 if (v8Value->IsObject()) {
668 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value); 668 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value);
669 v8::Handle<v8::Object> domError = wrapper->FindInstanceInPrototypeChain( V8DOMError::GetTemplate(m_isolate, worldType(m_isolate))); 669 v8::Handle<v8::Object> domError = wrapper->FindInstanceInPrototypeChain( V8DOMError::GetTemplate(m_isolate, worldType(m_isolate)));
670 if (!domError.IsEmpty()) 670 if (!domError.IsEmpty())
671 error = V8DOMError::toNative(domError); 671 error = V8DOMError::toNative(domError);
672 } 672 }
673 value = error; 673 value = error;
674 return true; 674 return true;
675 } 675 }
676 676
677 bool Dictionary::get(const String& key, RefPtr<VoidCallback>& value) const 677 bool Dictionary::get(const String& key, OwnPtr<VoidCallback>& value) const
678 { 678 {
679 v8::Local<v8::Value> v8Value; 679 v8::Local<v8::Value> v8Value;
680 if (!getKey(key, v8Value)) 680 if (!getKey(key, v8Value))
681 return false; 681 return false;
682 682
683 if (!v8Value->IsFunction()) 683 if (!v8Value->IsFunction())
684 return false; 684 return false;
685 685
686 value = V8VoidCallback::create(v8Value, getExecutionContext()); 686 value = V8VoidCallback::create(v8Value, getExecutionContext());
687 return true; 687 return true;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 { 782 {
783 if (forConstructor()) { 783 if (forConstructor()) {
784 exceptionState().throwTypeError(ExceptionMessages::failedToConstruct(int erfaceName(), detail)); 784 exceptionState().throwTypeError(ExceptionMessages::failedToConstruct(int erfaceName(), detail));
785 } else { 785 } else {
786 ASSERT(!methodName().isEmpty()); 786 ASSERT(!methodName().isEmpty());
787 exceptionState().throwTypeError(ExceptionMessages::failedToExecute(inter faceName(), methodName(), detail)); 787 exceptionState().throwTypeError(ExceptionMessages::failedToExecute(inter faceName(), methodName(), detail));
788 } 788 }
789 } 789 }
790 790
791 } // namespace WebCore 791 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/Dictionary.h ('k') | Source/core/html/VoidCallback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698