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

Side by Side Diff: Source/core/dom/ScriptExecutionContext.h

Issue 19693006: Pass column as 4th argument to WorkerGlobalScope.onerror handler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ErrorEvent.idl ('k') | Source/core/dom/ScriptExecutionContext.cpp » ('j') | 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2012 Google Inc. All Rights Reserved. 3 * Copyright (C) 2012 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 virtual bool isJSExecutionForbidden() const = 0; 63 virtual bool isJSExecutionForbidden() const = 0;
64 64
65 const KURL& url() const { return virtualURL(); } 65 const KURL& url() const { return virtualURL(); }
66 KURL completeURL(const String& url) const { return virtualCompleteURL(url); } 66 KURL completeURL(const String& url) const { return virtualCompleteURL(url); }
67 67
68 virtual String userAgent(const KURL&) const = 0; 68 virtual String userAgent(const KURL&) const = 0;
69 69
70 virtual void disableEval(const String& errorMessage) = 0; 70 virtual void disableEval(const String& errorMessage) = 0;
71 71
72 bool sanitizeScriptError(String& errorMessage, int& lineNumber, String& sour ceURL, CachedScript* = 0); 72 bool sanitizeScriptError(String& errorMessage, int& lineNumber, int& columnN umber, String& sourceURL, CachedScript* = 0);
73 void reportException(const String& errorMessage, int lineNumber, const Strin g& sourceURL, PassRefPtr<ScriptCallStack>, CachedScript* = 0); 73 void reportException(const String& errorMessage, int lineNumber, int columnN umber, const String& sourceURL, PassRefPtr<ScriptCallStack>, CachedScript* = 0);
74 74
75 void addConsoleMessage(MessageSource, MessageLevel, const String& message, c onst String& sourceURL, unsigned lineNumber, ScriptState* = 0, unsigned long req uestIdentifier = 0); 75 void addConsoleMessage(MessageSource, MessageLevel, const String& message, c onst String& sourceURL, unsigned lineNumber, ScriptState* = 0, unsigned long req uestIdentifier = 0);
76 virtual void addConsoleMessage(MessageSource, MessageLevel, const String& me ssage, unsigned long requestIdentifier = 0) = 0; 76 virtual void addConsoleMessage(MessageSource, MessageLevel, const String& me ssage, unsigned long requestIdentifier = 0) = 0;
77 77
78 virtual const SecurityOrigin* topOrigin() const = 0; 78 virtual const SecurityOrigin* topOrigin() const = 0;
79 79
80 PublicURLManager& publicURLManager(); 80 PublicURLManager& publicURLManager();
81 81
82 // Active objects are not garbage collected even if inaccessible, e.g. becau se their activity may result in callbacks being invoked. 82 // Active objects are not garbage collected even if inaccessible, e.g. becau se their activity may result in callbacks being invoked.
83 bool canSuspendActiveDOMObjects(); 83 bool canSuspendActiveDOMObjects();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 ContextLifecycleNotifier* lifecycleNotifier(); 151 ContextLifecycleNotifier* lifecycleNotifier();
152 152
153 private: 153 private:
154 friend class DOMTimer; // For installNewTimeout() and removeTimeoutByID() be low. 154 friend class DOMTimer; // For installNewTimeout() and removeTimeoutByID() be low.
155 155
156 virtual const KURL& virtualURL() const = 0; 156 virtual const KURL& virtualURL() const = 0;
157 virtual KURL virtualCompleteURL(const String&) const = 0; 157 virtual KURL virtualCompleteURL(const String&) const = 0;
158 158
159 virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, Scrip tState* = 0, unsigned long requestIdentifier = 0) = 0; 159 virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, Scrip tState* = 0, unsigned long requestIdentifier = 0) = 0;
160 virtual EventTarget* errorEventTarget() = 0; 160 virtual EventTarget* errorEventTarget() = 0;
161 virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) = 0; 161 virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) = 0;
162 bool dispatchErrorEvent(const String& errorMessage, int lineNumber, const St ring& sourceURL, CachedScript*); 162 bool dispatchErrorEvent(const String& errorMessage, int lineNumber, int colu mnNumber, const String& sourceURL, CachedScript*);
163 163
164 void closeMessagePorts(); 164 void closeMessagePorts();
165 165
166 virtual void refScriptExecutionContext() = 0; 166 virtual void refScriptExecutionContext() = 0;
167 virtual void derefScriptExecutionContext() = 0; 167 virtual void derefScriptExecutionContext() = 0;
168 virtual PassOwnPtr<LifecycleNotifier> createLifecycleNotifier() OVERRIDE; 168 virtual PassOwnPtr<LifecycleNotifier> createLifecycleNotifier() OVERRIDE;
169 169
170 // Implementation details for DOMTimer. No other classes should call these f unctions. 170 // Implementation details for DOMTimer. No other classes should call these f unctions.
171 int installNewTimeout(DOMTimer::Type, PassOwnPtr<ScheduledAction>, int timeo ut); 171 int installNewTimeout(DOMTimer::Type, PassOwnPtr<ScheduledAction>, int timeo ut);
172 bool removeTimeoutByIDIfTypeMatches(DOMTimer::Type, int timeoutID); // This makes underlying DOMTimer instance destructed. Returns true if removed. 172 bool removeTimeoutByIDIfTypeMatches(DOMTimer::Type, int timeoutID); // This makes underlying DOMTimer instance destructed. Returns true if removed.
(...skipping 18 matching lines...) Expand all
191 191
192 // The location of this member is important; to make sure contextDestroyed() notification on 192 // The location of this member is important; to make sure contextDestroyed() notification on
193 // ScriptExecutionContext's members (notably m_timeouts) is called before th ey are destructed, 193 // ScriptExecutionContext's members (notably m_timeouts) is called before th ey are destructed,
194 // m_lifecycleNotifer should be placed *after* such members. 194 // m_lifecycleNotifer should be placed *after* such members.
195 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; 195 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier;
196 }; 196 };
197 197
198 } // namespace WebCore 198 } // namespace WebCore
199 199
200 #endif // ScriptExecutionContext_h 200 #endif // ScriptExecutionContext_h
OLDNEW
« no previous file with comments | « Source/core/dom/ErrorEvent.idl ('k') | Source/core/dom/ScriptExecutionContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698