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

Side by Side Diff: sky/engine/core/events/ErrorEvent.cpp

Issue 922893002: Merge the Sky Engine changes from the SkyDart branch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « sky/engine/core/events/ErrorEvent.h ('k') | sky/engine/core/events/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 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "sky/engine/config.h" 31 #include "sky/engine/config.h"
32 #include "sky/engine/core/events/ErrorEvent.h" 32 #include "sky/engine/core/events/ErrorEvent.h"
33 33
34 #include "sky/engine/bindings/core/v8/V8Binding.h"
35 #include "v8/include/v8.h"
36
37 namespace blink { 34 namespace blink {
38 35
39 ErrorEventInit::ErrorEventInit() 36 ErrorEventInit::ErrorEventInit()
40 : message() 37 : message()
41 , filename() 38 , filename()
42 , lineno(0) 39 , lineno(0)
43 , colno(0) 40 , colno(0)
44 { 41 {
45 } 42 }
46 43
47 ErrorEvent::ErrorEvent() 44 ErrorEvent::ErrorEvent()
48 : m_sanitizedMessage() 45 : m_sanitizedMessage()
49 , m_fileName() 46 , m_fileName()
50 , m_lineNumber(0) 47 , m_lineNumber(0)
51 , m_columnNumber(0) 48 , m_columnNumber(0)
52 , m_world(DOMWrapperWorld::current(v8::Isolate::GetCurrent()))
53 { 49 {
54 } 50 }
55 51
56 ErrorEvent::ErrorEvent(const AtomicString& type, const ErrorEventInit& initializ er) 52 ErrorEvent::ErrorEvent(const AtomicString& type, const ErrorEventInit& initializ er)
57 : Event(type, initializer) 53 : Event(type, initializer)
58 , m_sanitizedMessage(initializer.message) 54 , m_sanitizedMessage(initializer.message)
59 , m_fileName(initializer.filename) 55 , m_fileName(initializer.filename)
60 , m_lineNumber(initializer.lineno) 56 , m_lineNumber(initializer.lineno)
61 , m_columnNumber(initializer.colno) 57 , m_columnNumber(initializer.colno)
62 , m_world(DOMWrapperWorld::current(v8::Isolate::GetCurrent()))
63 { 58 {
64 } 59 }
65 60
66 ErrorEvent::ErrorEvent(const String& message, const String& fileName, unsigned l ineNumber, unsigned columnNumber, DOMWrapperWorld* world) 61 ErrorEvent::ErrorEvent(const String& message, const String& fileName, unsigned l ineNumber, unsigned columnNumber)
67 : Event(EventTypeNames::error, false, true) 62 : Event(EventTypeNames::error, false, true)
68 , m_sanitizedMessage(message) 63 , m_sanitizedMessage(message)
69 , m_fileName(fileName) 64 , m_fileName(fileName)
70 , m_lineNumber(lineNumber) 65 , m_lineNumber(lineNumber)
71 , m_columnNumber(columnNumber) 66 , m_columnNumber(columnNumber)
72 , m_world(world)
73 { 67 {
74 } 68 }
75 69
76 void ErrorEvent::setUnsanitizedMessage(const String& message) 70 void ErrorEvent::setUnsanitizedMessage(const String& message)
77 { 71 {
78 ASSERT(m_unsanitizedMessage.isEmpty()); 72 ASSERT(m_unsanitizedMessage.isEmpty());
79 m_unsanitizedMessage = message; 73 m_unsanitizedMessage = message;
80 } 74 }
81 75
82 ErrorEvent::~ErrorEvent() 76 ErrorEvent::~ErrorEvent()
83 { 77 {
84 } 78 }
85 79
86 const AtomicString& ErrorEvent::interfaceName() const 80 const AtomicString& ErrorEvent::interfaceName() const
87 { 81 {
88 return EventNames::ErrorEvent; 82 return EventNames::ErrorEvent;
89 } 83 }
90 84
91 } // namespace blink 85 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/events/ErrorEvent.h ('k') | sky/engine/core/events/ErrorEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698