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

Side by Side Diff: Source/core/dom/ErrorEvent.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/Document.cpp ('k') | Source/core/dom/ErrorEvent.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) 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 24 matching lines...) Expand all
35 #include "wtf/text/WTFString.h" 35 #include "wtf/text/WTFString.h"
36 36
37 namespace WebCore { 37 namespace WebCore {
38 38
39 struct ErrorEventInit : public EventInit { 39 struct ErrorEventInit : public EventInit {
40 ErrorEventInit(); 40 ErrorEventInit();
41 41
42 String message; 42 String message;
43 String filename; 43 String filename;
44 unsigned lineno; 44 unsigned lineno;
45 unsigned column;
45 }; 46 };
46 47
47 class ErrorEvent : public Event { 48 class ErrorEvent : public Event {
48 public: 49 public:
49 static PassRefPtr<ErrorEvent> create() 50 static PassRefPtr<ErrorEvent> create()
50 { 51 {
51 return adoptRef(new ErrorEvent); 52 return adoptRef(new ErrorEvent);
52 } 53 }
53 static PassRefPtr<ErrorEvent> create(const String& message, const String& fi leName, unsigned lineNumber) 54 static PassRefPtr<ErrorEvent> create(const String& message, const String& fi leName, unsigned lineNumber, unsigned columnNumber)
54 { 55 {
55 return adoptRef(new ErrorEvent(message, fileName, lineNumber)); 56 return adoptRef(new ErrorEvent(message, fileName, lineNumber, columnNumb er));
56 } 57 }
57 static PassRefPtr<ErrorEvent> create(const AtomicString& type, const ErrorEv entInit& initializer) 58 static PassRefPtr<ErrorEvent> create(const AtomicString& type, const ErrorEv entInit& initializer)
58 { 59 {
59 return adoptRef(new ErrorEvent(type, initializer)); 60 return adoptRef(new ErrorEvent(type, initializer));
60 } 61 }
61 virtual ~ErrorEvent(); 62 virtual ~ErrorEvent();
62 63
63 const String& message() const { return m_message; } 64 const String& message() const { return m_message; }
64 const String& filename() const { return m_fileName; } 65 const String& filename() const { return m_fileName; }
65 unsigned lineno() const { return m_lineNumber; } 66 unsigned lineno() const { return m_lineNumber; }
67 unsigned column() const { return m_columnNumber; }
66 68
67 virtual const AtomicString& interfaceName() const; 69 virtual const AtomicString& interfaceName() const;
68 70
69 private: 71 private:
70 ErrorEvent(); 72 ErrorEvent();
71 ErrorEvent(const String& message, const String& fileName, unsigned lineNumbe r); 73 ErrorEvent(const String& message, const String& fileName, unsigned lineNumbe r, unsigned columnNumber);
72 ErrorEvent(const AtomicString&, const ErrorEventInit&); 74 ErrorEvent(const AtomicString&, const ErrorEventInit&);
73 75
74 String m_message; 76 String m_message;
75 String m_fileName; 77 String m_fileName;
76 unsigned m_lineNumber; 78 unsigned m_lineNumber;
79 unsigned m_columnNumber;
77 }; 80 };
78 81
79 } // namespace WebCore 82 } // namespace WebCore
80 83
81 #endif // ErrorEvent_h 84 #endif // ErrorEvent_h
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/ErrorEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698