| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 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 25 matching lines...) Expand all Loading... |
| 36 #include <v8.h> | 36 #include <v8.h> |
| 37 #include "wtf/PassRefPtr.h" | 37 #include "wtf/PassRefPtr.h" |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 class Node; | 41 class Node; |
| 42 class ScriptState; | 42 class ScriptState; |
| 43 | 43 |
| 44 class V8NodeFilterCondition : public NodeFilterCondition { | 44 class V8NodeFilterCondition : public NodeFilterCondition { |
| 45 public: | 45 public: |
| 46 static PassRefPtr<V8NodeFilterCondition> create(v8::Handle<v8::Value> filter
) | 46 static PassRefPtr<V8NodeFilterCondition> create(v8::Handle<v8::Value> filter
, v8::Handle<v8::Object> owner) |
| 47 { | 47 { |
| 48 return adoptRef(new V8NodeFilterCondition(filter)); | 48 return adoptRef(new V8NodeFilterCondition(filter, owner)); |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual ~V8NodeFilterCondition(); | 51 virtual ~V8NodeFilterCondition(); |
| 52 | 52 |
| 53 virtual short acceptNode(ScriptState*, Node*) const; | 53 virtual short acceptNode(ScriptState*, Node*) const; |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 explicit V8NodeFilterCondition(v8::Handle<v8::Value> filter); | 56 explicit V8NodeFilterCondition(v8::Handle<v8::Value> filter, v8::Handle<v8::
Object> owner); |
| 57 |
| 58 static void makeWeakCallback(v8::Isolate*, v8::Persistent<v8::Value>*, V8Nod
eFilterCondition*); |
| 57 | 59 |
| 58 ScopedPersistent<v8::Value> m_filter; | 60 ScopedPersistent<v8::Value> m_filter; |
| 59 }; | 61 }; |
| 60 | 62 |
| 61 } // namespace WebCore | 63 } // namespace WebCore |
| 62 | 64 |
| 63 #endif // V8NodeFilterCondition_h | 65 #endif // V8NodeFilterCondition_h |
| OLD | NEW |