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

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

Issue 20351002: Add 'error' parameter to 'window.onerror' handlers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Constructor. Created 7 years, 4 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/bindings/v8/custom/V8ErrorEventCustom.cpp ('k') | Source/core/dom/ErrorEvent.idl » ('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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return adoptRef(new ErrorEvent); 52 return adoptRef(new ErrorEvent);
53 } 53 }
54 static PassRefPtr<ErrorEvent> create(const String& message, const String& fi leName, unsigned lineNumber, unsigned columnNumber) 54 static PassRefPtr<ErrorEvent> create(const String& message, const String& fi leName, unsigned lineNumber, unsigned columnNumber)
55 { 55 {
56 return adoptRef(new ErrorEvent(message, fileName, lineNumber, columnNumb er)); 56 return adoptRef(new ErrorEvent(message, fileName, lineNumber, columnNumb er));
57 } 57 }
58 static PassRefPtr<ErrorEvent> create(const AtomicString& type, const ErrorEv entInit& initializer) 58 static PassRefPtr<ErrorEvent> create(const AtomicString& type, const ErrorEv entInit& initializer)
59 { 59 {
60 return adoptRef(new ErrorEvent(type, initializer)); 60 return adoptRef(new ErrorEvent(type, initializer));
61 } 61 }
62 static PassRefPtr<ErrorEvent> createSanitizedError()
63 {
64 return adoptRef(new ErrorEvent("Script error.", String(), 0, 0));
65 }
62 virtual ~ErrorEvent(); 66 virtual ~ErrorEvent();
63 67
64 const String& message() const { return m_message; } 68 const String& message() const { return m_message; }
65 const String& filename() const { return m_fileName; } 69 const String& filename() const { return m_fileName; }
66 unsigned lineno() const { return m_lineNumber; } 70 unsigned lineno() const { return m_lineNumber; }
67 unsigned colno() const { return m_columnNumber; } 71 unsigned colno() const { return m_columnNumber; }
68 72
69 virtual const AtomicString& interfaceName() const; 73 virtual const AtomicString& interfaceName() const;
70 74
71 private: 75 private:
72 ErrorEvent(); 76 ErrorEvent();
73 ErrorEvent(const String& message, const String& fileName, unsigned lineNumbe r, unsigned columnNumber); 77 ErrorEvent(const String& message, const String& fileName, unsigned lineNumbe r, unsigned columnNumber);
74 ErrorEvent(const AtomicString&, const ErrorEventInit&); 78 ErrorEvent(const AtomicString&, const ErrorEventInit&);
75 79
76 String m_message; 80 String m_message;
77 String m_fileName; 81 String m_fileName;
78 unsigned m_lineNumber; 82 unsigned m_lineNumber;
79 unsigned m_columnNumber; 83 unsigned m_columnNumber;
80 }; 84 };
81 85
82 } // namespace WebCore 86 } // namespace WebCore
83 87
84 #endif // ErrorEvent_h 88 #endif // ErrorEvent_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8ErrorEventCustom.cpp ('k') | Source/core/dom/ErrorEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698