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

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

Issue 21274004: Fix Document leak from NodeFilter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add assertions to wrap Created 7 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 | 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 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "V8Document.h" 32 #include "V8Document.h"
33 33
34 #include "V8CanvasRenderingContext2D.h" 34 #include "V8CanvasRenderingContext2D.h"
35 #include "V8DOMImplementation.h" 35 #include "V8DOMImplementation.h"
36 #include "V8HTMLDocument.h" 36 #include "V8HTMLDocument.h"
37 #include "V8Node.h" 37 #include "V8Node.h"
38 #include "V8NodeFilter.h"
39 #include "V8NodeIterator.h"
38 #include "V8SVGDocument.h" 40 #include "V8SVGDocument.h"
39 #include "V8Touch.h" 41 #include "V8Touch.h"
40 #include "V8TouchList.h" 42 #include "V8TouchList.h"
43 #include "V8TreeWalker.h"
41 #include "V8WebGLRenderingContext.h" 44 #include "V8WebGLRenderingContext.h"
42 #include "V8XPathNSResolver.h" 45 #include "V8XPathNSResolver.h"
43 #include "V8XPathResult.h" 46 #include "V8XPathResult.h"
44 #include "bindings/v8/ExceptionState.h" 47 #include "bindings/v8/ExceptionState.h"
45 #include "bindings/v8/ScriptController.h" 48 #include "bindings/v8/ScriptController.h"
46 #include "bindings/v8/V8Binding.h" 49 #include "bindings/v8/V8Binding.h"
47 #include "bindings/v8/V8DOMWrapper.h" 50 #include "bindings/v8/V8DOMWrapper.h"
51 #include "bindings/v8/V8HiddenPropertyName.h"
52 #include "bindings/v8/V8NodeFilterCondition.h"
haraken 2013/08/01 13:32:20 These #includes will be no longer necessary.
kouhei (in TOK) 2013/08/02 03:26:57 Done.
48 #include "bindings/v8/V8WindowShell.h" 53 #include "bindings/v8/V8WindowShell.h"
49 #include "bindings/v8/custom/V8CustomXPathNSResolver.h" 54 #include "bindings/v8/custom/V8CustomXPathNSResolver.h"
50 #include "core/dom/Document.h" 55 #include "core/dom/Document.h"
51 #include "core/dom/ExceptionCode.h" 56 #include "core/dom/ExceptionCode.h"
52 #include "core/dom/Node.h" 57 #include "core/dom/Node.h"
53 #include "core/dom/TouchList.h" 58 #include "core/dom/TouchList.h"
54 #include "core/html/canvas/CanvasRenderingContext.h" 59 #include "core/html/canvas/CanvasRenderingContext.h"
55 #include "core/page/Frame.h" 60 #include "core/page/Frame.h"
56 #include "core/xml/DocumentXPathEvaluator.h" 61 #include "core/xml/DocumentXPathEvaluator.h"
57 #include "core/xml/XPathNSResolver.h" 62 #include "core/xml/XPathNSResolver.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 115
111 for (int i = 0; i < args.Length(); i++) { 116 for (int i = 0; i < args.Length(); i++) {
112 Touch* touch = V8DOMWrapper::isWrapperOfType(args[i], &V8Touch::info) ? V8Touch::toNative(args[i]->ToObject()) : 0; 117 Touch* touch = V8DOMWrapper::isWrapperOfType(args[i], &V8Touch::info) ? V8Touch::toNative(args[i]->ToObject()) : 0;
113 touchList->append(touch); 118 touchList->append(touch);
114 } 119 }
115 120
116 v8SetReturnValue(args, toV8(touchList.release(), args.Holder(), args.GetIsol ate())); 121 v8SetReturnValue(args, toV8(touchList.release(), args.Holder(), args.GetIsol ate()));
117 } 122 }
118 123
119 } // namespace WebCore 124 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698