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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8MutationCallback.cpp

Issue 2785943002: [Bindings] Simplify V8PrivateProperty::Symbol methods (Closed)
Patch Set: work for comments Created 3 years, 8 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
OLDNEW
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 24 matching lines...) Expand all
35 #include "wtf/Assertions.h" 35 #include "wtf/Assertions.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 V8MutationCallback::V8MutationCallback(v8::Local<v8::Function> callback, 39 V8MutationCallback::V8MutationCallback(v8::Local<v8::Function> callback,
40 v8::Local<v8::Object> owner, 40 v8::Local<v8::Object> owner,
41 ScriptState* scriptState) 41 ScriptState* scriptState)
42 : m_callback(scriptState->isolate(), this, callback), 42 : m_callback(scriptState->isolate(), this, callback),
43 m_scriptState(scriptState) { 43 m_scriptState(scriptState) {
44 V8PrivateProperty::getMutationObserverCallback(scriptState->isolate()) 44 V8PrivateProperty::getMutationObserverCallback(scriptState->isolate())
45 .set(scriptState->context(), owner, callback); 45 .set(owner, callback);
46 } 46 }
47 47
48 V8MutationCallback::~V8MutationCallback() {} 48 V8MutationCallback::~V8MutationCallback() {}
49 49
50 void V8MutationCallback::call( 50 void V8MutationCallback::call(
51 const HeapVector<Member<MutationRecord>>& mutations, 51 const HeapVector<Member<MutationRecord>>& mutations,
52 MutationObserver* observer) { 52 MutationObserver* observer) {
53 v8::Isolate* isolate = m_scriptState->isolate(); 53 v8::Isolate* isolate = m_scriptState->isolate();
54 ExecutionContext* executionContext = m_scriptState->getExecutionContext(); 54 ExecutionContext* executionContext = m_scriptState->getExecutionContext();
55 if (!executionContext || executionContext->isContextSuspended() || 55 if (!executionContext || executionContext->isContextSuspended() ||
(...skipping 28 matching lines...) Expand all
84 DEFINE_TRACE(V8MutationCallback) { 84 DEFINE_TRACE(V8MutationCallback) {
85 MutationCallback::trace(visitor); 85 MutationCallback::trace(visitor);
86 } 86 }
87 87
88 DEFINE_TRACE_WRAPPERS(V8MutationCallback) { 88 DEFINE_TRACE_WRAPPERS(V8MutationCallback) {
89 visitor->traceWrappers(m_callback.cast<v8::Value>()); 89 visitor->traceWrappers(m_callback.cast<v8::Value>());
90 MutationCallback::traceWrappers(visitor); 90 MutationCallback::traceWrappers(visitor);
91 } 91 }
92 92
93 } // namespace blink 93 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698