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

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2209593002: Stop returning an empty handle from createWrapper() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 2351 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 return 0; 2362 return 0;
2363 } 2363 }
2364 2364
2365 v8::Local<v8::Object> Node::wrap(v8::Isolate* isolate, v8::Local<v8::Object> cre ationContext) 2365 v8::Local<v8::Object> Node::wrap(v8::Isolate* isolate, v8::Local<v8::Object> cre ationContext)
2366 { 2366 {
2367 DCHECK(!DOMDataStore::containsWrapper(this, isolate)); 2367 DCHECK(!DOMDataStore::containsWrapper(this, isolate));
2368 2368
2369 const WrapperTypeInfo* wrapperType = wrapperTypeInfo(); 2369 const WrapperTypeInfo* wrapperType = wrapperTypeInfo();
2370 2370
2371 v8::Local<v8::Object> wrapper = V8DOMWrapper::createWrapper(isolate, creatio nContext, wrapperType); 2371 v8::Local<v8::Object> wrapper = V8DOMWrapper::createWrapper(isolate, creatio nContext, wrapperType);
2372 if (UNLIKELY(wrapper.IsEmpty())) 2372 DCHECK(!wrapper.IsEmpty());
2373 return wrapper;
2374
2375 wrapperType->installConditionallyEnabledProperties(wrapper, isolate); 2373 wrapperType->installConditionallyEnabledProperties(wrapper, isolate);
2376 return associateWithWrapper(isolate, wrapperType, wrapper); 2374 return associateWithWrapper(isolate, wrapperType, wrapper);
2377 } 2375 }
2378 2376
2379 v8::Local<v8::Object> Node::associateWithWrapper(v8::Isolate* isolate, const Wra pperTypeInfo* wrapperType, v8::Local<v8::Object> wrapper) 2377 v8::Local<v8::Object> Node::associateWithWrapper(v8::Isolate* isolate, const Wra pperTypeInfo* wrapperType, v8::Local<v8::Object> wrapper)
2380 { 2378 {
2381 return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperType, wrapper); 2379 return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperType, wrapper);
2382 } 2380 }
2383 2381
2384 } // namespace blink 2382 } // namespace blink
(...skipping 18 matching lines...) Expand all
2403 2401
2404 void showNodePath(const blink::Node* node) 2402 void showNodePath(const blink::Node* node)
2405 { 2403 {
2406 if (node) 2404 if (node)
2407 node->showNodePathForThis(); 2405 node->showNodePathForThis();
2408 else 2406 else
2409 fprintf(stderr, "Cannot showNodePath for (nil)\n"); 2407 fprintf(stderr, "Cannot showNodePath for (nil)\n");
2410 } 2408 }
2411 2409
2412 #endif 2410 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698