OLD | NEW |
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 { | 47 { |
48 ScriptWrappable::init(this); | 48 ScriptWrappable::init(this); |
49 } | 49 } |
50 | 50 |
51 ErrorEvent::ErrorEvent(const AtomicString& type, const ErrorEventInit& initializ
er) | 51 ErrorEvent::ErrorEvent(const AtomicString& type, const ErrorEventInit& initializ
er) |
52 : Event(type, initializer) | 52 : Event(type, initializer) |
53 , m_sanitizedMessage(initializer.message) | 53 , m_sanitizedMessage(initializer.message) |
54 , m_fileName(initializer.filename) | 54 , m_fileName(initializer.filename) |
55 , m_lineNumber(initializer.lineno) | 55 , m_lineNumber(initializer.lineno) |
56 , m_columnNumber(initializer.colno) | 56 , m_columnNumber(initializer.colno) |
| 57 , m_world(DOMWrapperWorld::current()) |
57 { | 58 { |
58 ScriptWrappable::init(this); | 59 ScriptWrappable::init(this); |
59 } | 60 } |
60 | 61 |
61 ErrorEvent::ErrorEvent(const String& message, const String& fileName, unsigned l
ineNumber, unsigned columnNumber) | 62 ErrorEvent::ErrorEvent(const String& message, const String& fileName, unsigned l
ineNumber, unsigned columnNumber, PassRefPtr<DOMWrapperWorld> world) |
62 : Event(eventNames().errorEvent, false, true) | 63 : Event(eventNames().errorEvent, false, true) |
63 , m_sanitizedMessage(message) | 64 , m_sanitizedMessage(message) |
64 , m_fileName(fileName) | 65 , m_fileName(fileName) |
65 , m_lineNumber(lineNumber) | 66 , m_lineNumber(lineNumber) |
66 , m_columnNumber(columnNumber) | 67 , m_columnNumber(columnNumber) |
| 68 , m_world(world) |
67 { | 69 { |
68 ScriptWrappable::init(this); | 70 ScriptWrappable::init(this); |
69 } | 71 } |
70 | 72 |
71 void ErrorEvent::setUnsanitizedMessage(const String& message) | 73 void ErrorEvent::setUnsanitizedMessage(const String& message) |
72 { | 74 { |
73 ASSERT(m_unsanitizedMessage.isEmpty()); | 75 ASSERT(m_unsanitizedMessage.isEmpty()); |
74 m_unsanitizedMessage = message; | 76 m_unsanitizedMessage = message; |
75 } | 77 } |
76 | 78 |
77 ErrorEvent::~ErrorEvent() | 79 ErrorEvent::~ErrorEvent() |
78 { | 80 { |
79 } | 81 } |
80 | 82 |
81 const AtomicString& ErrorEvent::interfaceName() const | 83 const AtomicString& ErrorEvent::interfaceName() const |
82 { | 84 { |
83 return eventNames().interfaceForErrorEvent; | 85 return eventNames().interfaceForErrorEvent; |
84 } | 86 } |
85 | 87 |
86 } // namespace WebCore | 88 } // namespace WebCore |
OLD | NEW |