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

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

Issue 23637014: Have V8HiddenPropertyName static functions take an isolate in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | « Source/bindings/v8/V8MutationCallback.cpp ('k') | Source/bindings/v8/V8WindowShell.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) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 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 26 matching lines...) Expand all
37 #include "bindings/v8/V8HiddenPropertyName.h" 37 #include "bindings/v8/V8HiddenPropertyName.h"
38 #include "core/dom/Node.h" 38 #include "core/dom/Node.h"
39 #include "core/dom/NodeFilter.h" 39 #include "core/dom/NodeFilter.h"
40 #include "wtf/OwnArrayPtr.h" 40 #include "wtf/OwnArrayPtr.h"
41 41
42 namespace WebCore { 42 namespace WebCore {
43 43
44 V8NodeFilterCondition::V8NodeFilterCondition(v8::Handle<v8::Value> filter, v8::H andle<v8::Object> owner, v8::Isolate* isolate) 44 V8NodeFilterCondition::V8NodeFilterCondition(v8::Handle<v8::Value> filter, v8::H andle<v8::Object> owner, v8::Isolate* isolate)
45 : m_filter(isolate, filter) 45 : m_filter(isolate, filter)
46 { 46 {
47 owner->SetHiddenValue(V8HiddenPropertyName::condition(), filter); 47 owner->SetHiddenValue(V8HiddenPropertyName::condition(isolate), filter);
48 m_filter.makeWeak(this, &makeWeakCallback); 48 m_filter.makeWeak(this, &makeWeakCallback);
49 } 49 }
50 50
51 V8NodeFilterCondition::~V8NodeFilterCondition() 51 V8NodeFilterCondition::~V8NodeFilterCondition()
52 { 52 {
53 } 53 }
54 54
55 short V8NodeFilterCondition::acceptNode(ScriptState* state, Node* node) const 55 short V8NodeFilterCondition::acceptNode(ScriptState* state, Node* node) const
56 { 56 {
57 ASSERT(v8::Context::InContext()); 57 ASSERT(v8::Context::InContext());
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 return result->Int32Value(); 93 return result->Int32Value();
94 } 94 }
95 95
96 void V8NodeFilterCondition::makeWeakCallback(v8::Isolate*, v8::Persistent<v8::Va lue>*, V8NodeFilterCondition* condition) 96 void V8NodeFilterCondition::makeWeakCallback(v8::Isolate*, v8::Persistent<v8::Va lue>*, V8NodeFilterCondition* condition)
97 { 97 {
98 condition->m_filter.clear(); 98 condition->m_filter.clear();
99 } 99 }
100 100
101 } // namespace WebCore 101 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8MutationCallback.cpp ('k') | Source/bindings/v8/V8WindowShell.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698