| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // (V8) | 62 // (V8) |
| 63 class V8NodeFilterCondition final : public NodeFilterCondition { | 63 class V8NodeFilterCondition final : public NodeFilterCondition { |
| 64 public: | 64 public: |
| 65 static PassRefPtrWillBeRawPtr<V8NodeFilterCondition> create(v8::Local<v8::Va
lue> filter, v8::Local<v8::Object> owner, ScriptState* scriptState) | 65 static PassRefPtrWillBeRawPtr<V8NodeFilterCondition> create(v8::Local<v8::Va
lue> filter, v8::Local<v8::Object> owner, ScriptState* scriptState) |
| 66 { | 66 { |
| 67 return adoptRefWillBeNoop(new V8NodeFilterCondition(filter, owner, scrip
tState)); | 67 return adoptRefWillBeNoop(new V8NodeFilterCondition(filter, owner, scrip
tState)); |
| 68 } | 68 } |
| 69 | 69 |
| 70 virtual ~V8NodeFilterCondition(); | 70 virtual ~V8NodeFilterCondition(); |
| 71 | 71 |
| 72 virtual short acceptNode(Node*, ExceptionState&) const override; | 72 virtual unsigned acceptNode(Node*, ExceptionState&) const override; |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 // As the value |filter| is maintained by V8GC, the |owner| which references | 75 // As the value |filter| is maintained by V8GC, the |owner| which references |
| 76 // V8NodeFilterCondition, usually a wrapper of NodeFilter, is specified here | 76 // V8NodeFilterCondition, usually a wrapper of NodeFilter, is specified here |
| 77 // to hold a strong reference to |filter|. | 77 // to hold a strong reference to |filter|. |
| 78 V8NodeFilterCondition(v8::Local<v8::Value> filter, v8::Local<v8::Object> own
er, ScriptState*); | 78 V8NodeFilterCondition(v8::Local<v8::Value> filter, v8::Local<v8::Object> own
er, ScriptState*); |
| 79 | 79 |
| 80 static void setWeakCallback(const v8::WeakCallbackInfo<V8NodeFilterCondition
>&); | 80 static void setWeakCallback(const v8::WeakCallbackInfo<V8NodeFilterCondition
>&); |
| 81 | 81 |
| 82 RefPtr<ScriptState> m_scriptState; | 82 RefPtr<ScriptState> m_scriptState; |
| 83 ScopedPersistent<v8::Value> m_filter; | 83 ScopedPersistent<v8::Value> m_filter; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace blink | 86 } // namespace blink |
| 87 | 87 |
| 88 #endif // V8NodeFilterCondition_h | 88 #endif // V8NodeFilterCondition_h |
| OLD | NEW |