| OLD | NEW |
| 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 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 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 "bindings/core/v8/V8NodeFilterCondition.h" | 31 #include "bindings/core/v8/V8NodeFilterCondition.h" |
| 32 | 32 |
| 33 #include "bindings/core/v8/ScriptController.h" | 33 #include "bindings/core/v8/ScriptController.h" |
| 34 #include "bindings/core/v8/V8Node.h" | 34 #include "bindings/core/v8/V8Node.h" |
| 35 #include "bindings/core/v8/V8PrivateProperty.h" | |
| 36 #include "core/dom/ExecutionContext.h" | 35 #include "core/dom/ExecutionContext.h" |
| 37 #include "core/dom/Node.h" | 36 #include "core/dom/Node.h" |
| 38 #include "core/dom/NodeFilter.h" | 37 #include "core/dom/NodeFilter.h" |
| 39 #include "core/frame/UseCounter.h" | 38 #include "core/frame/UseCounter.h" |
| 40 #include "platform/bindings/ScriptState.h" | 39 #include "platform/bindings/ScriptState.h" |
| 40 #include "platform/bindings/V8PrivateProperty.h" |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 V8NodeFilterCondition::V8NodeFilterCondition(v8::Local<v8::Value> filter, | 44 V8NodeFilterCondition::V8NodeFilterCondition(v8::Local<v8::Value> filter, |
| 45 ScriptState* script_state) | 45 ScriptState* script_state) |
| 46 : script_state_(script_state), filter_(this) { | 46 : script_state_(script_state), filter_(this) { |
| 47 // ..acceptNode(..) will only dispatch filter_ if filter_->IsObject(). | 47 // ..acceptNode(..) will only dispatch filter_ if filter_->IsObject(). |
| 48 // We'll make sure filter_ is either usable by acceptNode or empty. | 48 // We'll make sure filter_ is either usable by acceptNode or empty. |
| 49 // (See the fast/dom/node-filter-gc test for a case where 'empty' happens.) | 49 // (See the fast/dom/node-filter-gc test for a case where 'empty' happens.) |
| 50 if (!filter.IsEmpty() && filter->IsObject()) | 50 if (!filter.IsEmpty() && filter->IsObject()) |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 115 |
| 116 uint32_t uint32_value; | 116 uint32_t uint32_value; |
| 117 if (!result->Uint32Value(script_state_->GetContext()).To(&uint32_value)) { | 117 if (!result->Uint32Value(script_state_->GetContext()).To(&uint32_value)) { |
| 118 exception_state.RethrowV8Exception(exception_catcher.Exception()); | 118 exception_state.RethrowV8Exception(exception_catcher.Exception()); |
| 119 return NodeFilter::kFilterReject; | 119 return NodeFilter::kFilterReject; |
| 120 } | 120 } |
| 121 return uint32_value; | 121 return uint32_value; |
| 122 } | 122 } |
| 123 | 123 |
| 124 } // namespace blink | 124 } // namespace blink |
| OLD | NEW |