OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 30 matching lines...) Expand all Loading... |
41 , m_scriptState(scriptState) | 41 , m_scriptState(scriptState) |
42 { | 42 { |
43 V8HiddenValue::setHiddenValue(scriptState, owner, V8HiddenValue::callback(sc
riptState->isolate()), callback); | 43 V8HiddenValue::setHiddenValue(scriptState, owner, V8HiddenValue::callback(sc
riptState->isolate()), callback); |
44 m_callback.setWeak(this, &setWeakCallback); | 44 m_callback.setWeak(this, &setWeakCallback); |
45 } | 45 } |
46 | 46 |
47 V8MutationCallback::~V8MutationCallback() | 47 V8MutationCallback::~V8MutationCallback() |
48 { | 48 { |
49 } | 49 } |
50 | 50 |
51 void V8MutationCallback::call(const WillBeHeapVector<RefPtrWillBeMember<Mutation
Record>>& mutations, MutationObserver* observer) | 51 void V8MutationCallback::call(const HeapVector<Member<MutationRecord>>& mutation
s, MutationObserver* observer) |
52 { | 52 { |
53 if (!canInvokeCallback()) | 53 if (!canInvokeCallback()) |
54 return; | 54 return; |
55 | 55 |
56 v8::Isolate* isolate = m_scriptState->isolate(); | 56 v8::Isolate* isolate = m_scriptState->isolate(); |
57 | 57 |
58 if (!m_scriptState->contextIsValid()) | 58 if (!m_scriptState->contextIsValid()) |
59 return; | 59 return; |
60 ScriptState::Scope scope(m_scriptState.get()); | 60 ScriptState::Scope scope(m_scriptState.get()); |
61 | 61 |
(...skipping 25 matching lines...) Expand all Loading... |
87 data.GetParameter()->m_callback.clear(); | 87 data.GetParameter()->m_callback.clear(); |
88 } | 88 } |
89 | 89 |
90 DEFINE_TRACE(V8MutationCallback) | 90 DEFINE_TRACE(V8MutationCallback) |
91 { | 91 { |
92 MutationCallback::trace(visitor); | 92 MutationCallback::trace(visitor); |
93 ActiveDOMCallback::trace(visitor); | 93 ActiveDOMCallback::trace(visitor); |
94 } | 94 } |
95 | 95 |
96 } // namespace blink | 96 } // namespace blink |
OLD | NEW |