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

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

Issue 22985006: Throw an exception when denying access to 'Frame's 'location' setter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/core/dom/ErrorEvent.h ('k') | Source/core/dom/ScriptExecutionContext.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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 { 43 {
44 } 44 }
45 45
46 ErrorEvent::ErrorEvent() 46 ErrorEvent::ErrorEvent()
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_message(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 { 57 {
58 ScriptWrappable::init(this); 58 ScriptWrappable::init(this);
59 } 59 }
60 60
61 ErrorEvent::ErrorEvent(const String& message, const String& fileName, unsigned l ineNumber, unsigned columnNumber) 61 ErrorEvent::ErrorEvent(const String& message, const String& fileName, unsigned l ineNumber, unsigned columnNumber)
62 : Event(eventNames().errorEvent, false, true) 62 : Event(eventNames().errorEvent, false, true)
63 , m_message(message) 63 , m_sanitizedMessage(message)
64 , m_fileName(fileName) 64 , m_fileName(fileName)
65 , m_lineNumber(lineNumber) 65 , m_lineNumber(lineNumber)
66 , m_columnNumber(columnNumber) 66 , m_columnNumber(columnNumber)
67 { 67 {
68 ScriptWrappable::init(this); 68 ScriptWrappable::init(this);
69 } 69 }
70 70
71 void ErrorEvent::setUnsanitizedMessage(const String& message)
72 {
73 ASSERT(m_unsanitizedMessage.isEmpty());
74 m_unsanitizedMessage = message;
75 }
76
71 ErrorEvent::~ErrorEvent() 77 ErrorEvent::~ErrorEvent()
72 { 78 {
73 } 79 }
74 80
75 const AtomicString& ErrorEvent::interfaceName() const 81 const AtomicString& ErrorEvent::interfaceName() const
76 { 82 {
77 return eventNames().interfaceForErrorEvent; 83 return eventNames().interfaceForErrorEvent;
78 } 84 }
79 85
80 } // namespace WebCore 86 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/ErrorEvent.h ('k') | Source/core/dom/ScriptExecutionContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698