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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 months 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 | « no previous file | Source/bindings/v8/IDBBindingUtilities.cpp » ('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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 value = V8MediaStream::toNativeWithTypeCheck(m_isolate, v8Value); 518 value = V8MediaStream::toNativeWithTypeCheck(m_isolate, v8Value);
519 return true; 519 return true;
520 } 520 }
521 521
522 bool Dictionary::get(const String& key, RefPtr<EventTarget>& value) const 522 bool Dictionary::get(const String& key, RefPtr<EventTarget>& value) const
523 { 523 {
524 v8::Local<v8::Value> v8Value; 524 v8::Local<v8::Value> v8Value;
525 if (!getKey(key, v8Value)) 525 if (!getKey(key, v8Value))
526 return false; 526 return false;
527 527
528 value = 0; 528 value = nullptr;
529 // We need to handle a DOMWindow specially, because a DOMWindow wrapper 529 // We need to handle a DOMWindow specially, because a DOMWindow wrapper
530 // exists on a prototype chain of v8Value. 530 // exists on a prototype chain of v8Value.
531 if (v8Value->IsObject()) { 531 if (v8Value->IsObject()) {
532 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value); 532 v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(v8Value);
533 v8::Handle<v8::Object> window = wrapper->FindInstanceInPrototypeChain(V8 Window::domTemplate(m_isolate, worldTypeInMainThread(m_isolate))); 533 v8::Handle<v8::Object> window = wrapper->FindInstanceInPrototypeChain(V8 Window::domTemplate(m_isolate, worldTypeInMainThread(m_isolate)));
534 if (!window.IsEmpty()) { 534 if (!window.IsEmpty()) {
535 value = toWrapperTypeInfo(window)->toEventTarget(window); 535 value = toWrapperTypeInfo(window)->toEventTarget(window);
536 return true; 536 return true;
537 } 537 }
538 } 538 }
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 { 752 {
753 if (forConstructor()) { 753 if (forConstructor()) {
754 exceptionState().throwTypeError(detail); 754 exceptionState().throwTypeError(detail);
755 } else { 755 } else {
756 ASSERT(!methodName().isEmpty()); 756 ASSERT(!methodName().isEmpty());
757 exceptionState().throwTypeError(ExceptionMessages::failedToExecute(inter faceName(), methodName(), detail)); 757 exceptionState().throwTypeError(ExceptionMessages::failedToExecute(inter faceName(), methodName(), detail));
758 } 758 }
759 } 759 }
760 760
761 } // namespace WebCore 761 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/v8/IDBBindingUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698