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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/WindowProxy.h

Issue 2954873002: Add DVLOG_IS_ON() in preparation for adding dvlog_always_on in chromium project.
Patch Set: Created 3 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 virtual void DisposeContext(Lifecycle next_status) = 0; 230 virtual void DisposeContext(Lifecycle next_status) = 0;
231 231
232 WARN_UNUSED_RESULT v8::Local<v8::Object> AssociateWithWrapper( 232 WARN_UNUSED_RESULT v8::Local<v8::Object> AssociateWithWrapper(
233 DOMWindow*, 233 DOMWindow*,
234 const WrapperTypeInfo*, 234 const WrapperTypeInfo*,
235 v8::Local<v8::Object> wrapper); 235 v8::Local<v8::Object> wrapper);
236 236
237 v8::Isolate* GetIsolate() const { return isolate_; } 237 v8::Isolate* GetIsolate() const { return isolate_; }
238 Frame* GetFrame() const { return frame_.Get(); } 238 Frame* GetFrame() const { return frame_.Get(); }
239 239
240 #if DCHECK_IS_ON() 240 #if DCHECK_IS_ON() || DVLOG_IS_ON()
241 void DidAttachGlobalObject() { is_global_object_attached_ = true; } 241 void DidAttachGlobalObject() { is_global_object_attached_ = true; }
242 void DidDetachGlobalObject() { is_global_object_attached_ = false; } 242 void DidDetachGlobalObject() { is_global_object_attached_ = false; }
243 #endif 243 #endif
244 244
245 private: 245 private:
246 v8::Isolate* const isolate_; 246 v8::Isolate* const isolate_;
247 const Member<Frame> frame_; 247 const Member<Frame> frame_;
248 #if DCHECK_IS_ON() 248 #if DCHECK_IS_ON() || DVLOG_IS_ON()
249 bool is_global_object_attached_ = false; 249 bool is_global_object_attached_ = false;
250 #endif 250 #endif
251 251
252 protected: 252 protected:
253 // TODO(dcheng): Consider making these private and using getters. 253 // TODO(dcheng): Consider making these private and using getters.
254 const RefPtr<DOMWrapperWorld> world_; 254 const RefPtr<DOMWrapperWorld> world_;
255 // |global_proxy_| is the root reference from Blink to v8::Context (a strong 255 // |global_proxy_| is the root reference from Blink to v8::Context (a strong
256 // reference to the global proxy makes the entire context alive). In order to 256 // reference to the global proxy makes the entire context alive). In order to
257 // discard the v8::Context, |global_proxy_| needs to be a weak reference or 257 // discard the v8::Context, |global_proxy_| needs to be a weak reference or
258 // to be destroyed. 258 // to be destroyed.
259 ScopedPersistent<v8::Object> global_proxy_; 259 ScopedPersistent<v8::Object> global_proxy_;
260 Lifecycle lifecycle_; 260 Lifecycle lifecycle_;
261 261
262 // TODO(dcheng): Remove this temporary code for debugging 262 // TODO(dcheng): Remove this temporary code for debugging
263 // https://crbug.com/728693. 263 // https://crbug.com/728693.
264 WTF::debug::StackTrace initialization_stack_; 264 WTF::debug::StackTrace initialization_stack_;
265 }; 265 };
266 266
267 } // namespace blink 267 } // namespace blink
268 268
269 #endif // WindowProxy_h 269 #endif // WindowProxy_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698