| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 { | 44 { |
| 45 } | 45 } |
| 46 | 46 |
| 47 ErrorEvent::ErrorEvent() | 47 ErrorEvent::ErrorEvent() |
| 48 : m_sanitizedMessage() | 48 : m_sanitizedMessage() |
| 49 , m_fileName() | 49 , m_fileName() |
| 50 , m_lineNumber(0) | 50 , m_lineNumber(0) |
| 51 , m_columnNumber(0) | 51 , m_columnNumber(0) |
| 52 , m_world(DOMWrapperWorld::current(v8::Isolate::GetCurrent())) | 52 , m_world(DOMWrapperWorld::current(v8::Isolate::GetCurrent())) |
| 53 { | 53 { |
| 54 ScriptWrappable::init(this); | |
| 55 } | 54 } |
| 56 | 55 |
| 57 ErrorEvent::ErrorEvent(const AtomicString& type, const ErrorEventInit& initializ
er) | 56 ErrorEvent::ErrorEvent(const AtomicString& type, const ErrorEventInit& initializ
er) |
| 58 : Event(type, initializer) | 57 : Event(type, initializer) |
| 59 , m_sanitizedMessage(initializer.message) | 58 , m_sanitizedMessage(initializer.message) |
| 60 , m_fileName(initializer.filename) | 59 , m_fileName(initializer.filename) |
| 61 , m_lineNumber(initializer.lineno) | 60 , m_lineNumber(initializer.lineno) |
| 62 , m_columnNumber(initializer.colno) | 61 , m_columnNumber(initializer.colno) |
| 63 , m_world(DOMWrapperWorld::current(v8::Isolate::GetCurrent())) | 62 , m_world(DOMWrapperWorld::current(v8::Isolate::GetCurrent())) |
| 64 { | 63 { |
| 65 ScriptWrappable::init(this); | |
| 66 } | 64 } |
| 67 | 65 |
| 68 ErrorEvent::ErrorEvent(const String& message, const String& fileName, unsigned l
ineNumber, unsigned columnNumber, DOMWrapperWorld* world) | 66 ErrorEvent::ErrorEvent(const String& message, const String& fileName, unsigned l
ineNumber, unsigned columnNumber, DOMWrapperWorld* world) |
| 69 : Event(EventTypeNames::error, false, true) | 67 : Event(EventTypeNames::error, false, true) |
| 70 , m_sanitizedMessage(message) | 68 , m_sanitizedMessage(message) |
| 71 , m_fileName(fileName) | 69 , m_fileName(fileName) |
| 72 , m_lineNumber(lineNumber) | 70 , m_lineNumber(lineNumber) |
| 73 , m_columnNumber(columnNumber) | 71 , m_columnNumber(columnNumber) |
| 74 , m_world(world) | 72 , m_world(world) |
| 75 { | 73 { |
| 76 ScriptWrappable::init(this); | |
| 77 } | 74 } |
| 78 | 75 |
| 79 void ErrorEvent::setUnsanitizedMessage(const String& message) | 76 void ErrorEvent::setUnsanitizedMessage(const String& message) |
| 80 { | 77 { |
| 81 ASSERT(m_unsanitizedMessage.isEmpty()); | 78 ASSERT(m_unsanitizedMessage.isEmpty()); |
| 82 m_unsanitizedMessage = message; | 79 m_unsanitizedMessage = message; |
| 83 } | 80 } |
| 84 | 81 |
| 85 ErrorEvent::~ErrorEvent() | 82 ErrorEvent::~ErrorEvent() |
| 86 { | 83 { |
| 87 } | 84 } |
| 88 | 85 |
| 89 const AtomicString& ErrorEvent::interfaceName() const | 86 const AtomicString& ErrorEvent::interfaceName() const |
| 90 { | 87 { |
| 91 return EventNames::ErrorEvent; | 88 return EventNames::ErrorEvent; |
| 92 } | 89 } |
| 93 | 90 |
| 94 void ErrorEvent::trace(Visitor* visitor) | 91 void ErrorEvent::trace(Visitor* visitor) |
| 95 { | 92 { |
| 96 Event::trace(visitor); | 93 Event::trace(visitor); |
| 97 } | 94 } |
| 98 | 95 |
| 99 } // namespace blink | 96 } // namespace blink |
| OLD | NEW |