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

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

Issue 26792002: Reland: Reland: Implement new Blink IDL attribute [SetReference] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: mark NodeFilter Dependent Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. 2 * Copyright (C) 2007-2009 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 23 matching lines...) Expand all
34 #include "V8Node.h" 34 #include "V8Node.h"
35 #include "bindings/v8/V8Binding.h" 35 #include "bindings/v8/V8Binding.h"
36 #include "bindings/v8/V8GCController.h" 36 #include "bindings/v8/V8GCController.h"
37 #include "core/dom/LiveNodeList.h" 37 #include "core/dom/LiveNodeList.h"
38 #include "core/dom/NodeList.h" 38 #include "core/dom/NodeList.h"
39 #include "wtf/RefPtr.h" 39 #include "wtf/RefPtr.h"
40 #include "wtf/StdLibExtras.h" 40 #include "wtf/StdLibExtras.h"
41 41
42 namespace WebCore { 42 namespace WebCore {
43 43
44 void* V8NodeList::opaqueRootForGC(void* object, v8::Isolate* isolate) 44 void V8NodeList::resolveWrapperReachability(void* object, const v8::Persistent<v 8::Object>& wrapper, v8::Isolate* isolate)
45 { 45 {
46 NodeList* impl = static_cast<NodeList*>(object); 46 NodeList* impl = static_cast<NodeList*>(object);
47 if (!impl->isLiveNodeList()) 47 if (!impl->isLiveNodeList()) {
48 return object; 48 setObjectGroup(object, wrapper, isolate);
49 return;
50 }
49 Node* owner = static_cast<LiveNodeList*>(impl)->ownerNode(); 51 Node* owner = static_cast<LiveNodeList*>(impl)->ownerNode();
50 if (!owner) 52 if (!owner) {
51 return object; 53 setObjectGroup(object, wrapper, isolate);
52 return V8GCController::opaqueRootForGC(owner, isolate); 54 return;
55 }
56
57 setObjectGroup(V8GCController::opaqueRootForGC(owner, isolate), wrapper, iso late);
53 } 58 }
54 59
55 } // namespace WebCore 60 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8NodeIteratorCustom.cpp ('k') | Source/bindings/v8/custom/V8TreeWalkerCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698