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

Side by Side Diff: Source/bindings/v8/custom/V8WindowCustom.cpp

Issue 280123002: Oilpan: move LiveNodeList collections to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have NodeRareData clear out NodeListsNodeData instead. Created 6 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2011 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 408
409 // Search IDL functions defined in the prototype 409 // Search IDL functions defined in the prototype
410 if (!info.Holder()->GetRealNamedProperty(name).IsEmpty()) 410 if (!info.Holder()->GetRealNamedProperty(name).IsEmpty())
411 return; 411 return;
412 412
413 // Search named items in the document. 413 // Search named items in the document.
414 Document* doc = frame->document(); 414 Document* doc = frame->document();
415 415
416 if (doc && doc->isHTMLDocument()) { 416 if (doc && doc->isHTMLDocument()) {
417 if (toHTMLDocument(doc)->hasNamedItem(propName) || doc->hasElementWithId (propName.impl())) { 417 if (toHTMLDocument(doc)->hasNamedItem(propName) || doc->hasElementWithId (propName.impl())) {
418 RefPtr<HTMLCollection> items = doc->windowNamedItems(propName); 418 RefPtrWillBeRawPtr<HTMLCollection> items = doc->windowNamedItems(pro pName);
419 if (!items->isEmpty()) { 419 if (!items->isEmpty()) {
420 if (items->hasExactlyOneItem()) { 420 if (items->hasExactlyOneItem()) {
421 v8SetReturnValueFast(info, items->item(0), window); 421 v8SetReturnValueFast(info, items->item(0), window);
422 return; 422 return;
423 } 423 }
424 v8SetReturnValueFast(info, items.release(), window); 424 v8SetReturnValueFast(info, items.release(), window);
425 return; 425 return;
426 } 426 }
427 } 427 }
428 } 428 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 v8::Handle<v8::Context> context = toV8Context(isolate, frame, DOMWrapperWorl d::current(isolate)); 549 v8::Handle<v8::Context> context = toV8Context(isolate, frame, DOMWrapperWorl d::current(isolate));
550 if (context.IsEmpty()) 550 if (context.IsEmpty())
551 return v8Undefined(); 551 return v8Undefined();
552 552
553 v8::Handle<v8::Object> global = context->Global(); 553 v8::Handle<v8::Object> global = context->Global();
554 ASSERT(!global.IsEmpty()); 554 ASSERT(!global.IsEmpty());
555 return global; 555 return global;
556 } 556 }
557 557
558 } // namespace WebCore 558 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp ('k') | Source/core/accessibility/AXTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698