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

Side by Side Diff: Source/core/frame/ConsoleBase.h

Issue 206093005: Oilpan: move Console objects to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 18 matching lines...) Expand all
29 29
30 #ifndef ConsoleBase_h 30 #ifndef ConsoleBase_h
31 #define ConsoleBase_h 31 #define ConsoleBase_h
32 32
33 #include "bindings/v8/ScriptState.h" 33 #include "bindings/v8/ScriptState.h"
34 #include "bindings/v8/ScriptWrappable.h" 34 #include "bindings/v8/ScriptWrappable.h"
35 #include "core/inspector/ConsoleAPITypes.h" 35 #include "core/inspector/ConsoleAPITypes.h"
36 #include "core/inspector/ScriptCallStack.h" 36 #include "core/inspector/ScriptCallStack.h"
37 #include "core/frame/ConsoleTypes.h" 37 #include "core/frame/ConsoleTypes.h"
38 #include "core/frame/DOMWindowProperty.h" 38 #include "core/frame/DOMWindowProperty.h"
39 #include "heap/Handle.h"
39 #include "wtf/Forward.h" 40 #include "wtf/Forward.h"
40 #include "wtf/PassRefPtr.h" 41 #include "wtf/PassRefPtr.h"
41 #include "wtf/RefCounted.h" 42 #include "wtf/RefCounted.h"
42 43
43 namespace WebCore { 44 namespace WebCore {
44 45
45 class ScriptArguments; 46 class ScriptArguments;
46 47
47 class ConsoleBase { 48 class ConsoleBase : public NoBaseWillBeGarbageCollectedFinalized<ConsoleBase> {
48 public: 49 public:
50 #if !ENABLE(OILPAN)
49 void ref() { refConsole(); } 51 void ref() { refConsole(); }
Mads Ager (chromium) 2014/03/20 14:20:01 WAT!?! What is this, I don't even?!? Why isn't Co
sof 2014/03/20 14:57:23 Not missing anything, it definitely can be simplif
50 void deref() { derefConsole(); } 52 void deref() { derefConsole(); }
53 #endif
51 54
52 void debug(ScriptState*, PassRefPtr<ScriptArguments>); 55 void debug(ScriptState*, PassRefPtr<ScriptArguments>);
53 void error(ScriptState*, PassRefPtr<ScriptArguments>); 56 void error(ScriptState*, PassRefPtr<ScriptArguments>);
54 void info(ScriptState*, PassRefPtr<ScriptArguments>); 57 void info(ScriptState*, PassRefPtr<ScriptArguments>);
55 void log(ScriptState*, PassRefPtr<ScriptArguments>); 58 void log(ScriptState*, PassRefPtr<ScriptArguments>);
56 void clear(ScriptState*, PassRefPtr<ScriptArguments>); 59 void clear(ScriptState*, PassRefPtr<ScriptArguments>);
57 void warn(ScriptState*, PassRefPtr<ScriptArguments>); 60 void warn(ScriptState*, PassRefPtr<ScriptArguments>);
58 void dir(ScriptState*, PassRefPtr<ScriptArguments>); 61 void dir(ScriptState*, PassRefPtr<ScriptArguments>);
59 void dirxml(ScriptState*, PassRefPtr<ScriptArguments>); 62 void dirxml(ScriptState*, PassRefPtr<ScriptArguments>);
60 void table(ScriptState*, PassRefPtr<ScriptArguments>); 63 void table(ScriptState*, PassRefPtr<ScriptArguments>);
61 void trace(ScriptState*, PassRefPtr<ScriptArguments>); 64 void trace(ScriptState*, PassRefPtr<ScriptArguments>);
62 void assertCondition(ScriptState*, PassRefPtr<ScriptArguments>, bool conditi on); 65 void assertCondition(ScriptState*, PassRefPtr<ScriptArguments>, bool conditi on);
63 void count(ScriptState*, PassRefPtr<ScriptArguments>); 66 void count(ScriptState*, PassRefPtr<ScriptArguments>);
64 void markTimeline(const String&); 67 void markTimeline(const String&);
65 void profile(ScriptState*, const String&); 68 void profile(ScriptState*, const String&);
66 void profileEnd(ScriptState*, const String&); 69 void profileEnd(ScriptState*, const String&);
67 void time(const String&); 70 void time(const String&);
68 void timeEnd(ScriptState*, const String&); 71 void timeEnd(ScriptState*, const String&);
69 void timeStamp(const String&); 72 void timeStamp(const String&);
70 void timeline(ScriptState*, const String&); 73 void timeline(ScriptState*, const String&);
71 void timelineEnd(ScriptState*, const String&); 74 void timelineEnd(ScriptState*, const String&);
72 void group(ScriptState*, PassRefPtr<ScriptArguments>); 75 void group(ScriptState*, PassRefPtr<ScriptArguments>);
73 void groupCollapsed(ScriptState*, PassRefPtr<ScriptArguments>); 76 void groupCollapsed(ScriptState*, PassRefPtr<ScriptArguments>);
74 void groupEnd(); 77 void groupEnd();
75 78
79 virtual void trace(Visitor*) { }
80
81 #if !ENABLE(OILPAN)
76 protected: 82 protected:
83 #endif
haraken 2014/03/20 14:13:06 I'd just remove protected: and make the destructor
sof 2014/03/20 14:57:23 yes; with RefCounted<> now on ConsoleBase the slig
77 virtual ~ConsoleBase(); 84 virtual ~ConsoleBase();
85
86 protected:
78 virtual ExecutionContext* context() = 0; 87 virtual ExecutionContext* context() = 0;
79 virtual void reportMessageToClient(MessageLevel, const String& message, Pass RefPtr<ScriptCallStack>) = 0; 88 virtual void reportMessageToClient(MessageLevel, const String& message, Pass RefPtr<ScriptCallStack>) = 0;
80 89
81 private: 90 private:
91 #if !ENABLE(OILPAN)
82 virtual void refConsole() = 0; 92 virtual void refConsole() = 0;
83 virtual void derefConsole() = 0; 93 virtual void derefConsole() = 0;
94 #endif
84 95
85 void internalAddMessage(MessageType, MessageLevel, ScriptState*, PassRefPtr< ScriptArguments>, bool acceptNoArguments = false, bool printTrace = false); 96 void internalAddMessage(MessageType, MessageLevel, ScriptState*, PassRefPtr< ScriptArguments>, bool acceptNoArguments = false, bool printTrace = false);
86 }; 97 };
87 98
88 } // namespace WebCore 99 } // namespace WebCore
89 100
90 #endif // ConsoleBase_h 101 #endif // ConsoleBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698