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

Side by Side Diff: Source/bindings/core/v8/ExceptionState.cpp

Issue 692443002: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | Source/bindings/core/v8/V8Binding.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 { 92 {
93 ASSERT(!m_exception.isEmpty()); 93 ASSERT(!m_exception.isEmpty());
94 V8ThrowException::throwException(m_exception.newLocal(m_isolate), m_isolate) ; 94 V8ThrowException::throwException(m_exception.newLocal(m_isolate), m_isolate) ;
95 } 95 }
96 96
97 void ExceptionState::throwTypeError(const String& message) 97 void ExceptionState::throwTypeError(const String& message)
98 { 98 {
99 ASSERT(m_isolate); 99 ASSERT(m_isolate);
100 m_code = V8TypeError; 100 m_code = V8TypeError;
101 m_message = message; 101 m_message = message;
102 setException(V8ThrowException::createTypeError(addExceptionContext(message), m_isolate)); 102 setException(V8ThrowException::createTypeError(m_isolate, addExceptionContex t(message)));
103 } 103 }
104 104
105 void ExceptionState::throwRangeError(const String& message) 105 void ExceptionState::throwRangeError(const String& message)
106 { 106 {
107 ASSERT(m_isolate); 107 ASSERT(m_isolate);
108 m_code = V8RangeError; 108 m_code = V8RangeError;
109 m_message = message; 109 m_message = message;
110 setException(V8ThrowException::createRangeError(addExceptionContext(message) , m_isolate)); 110 setException(V8ThrowException::createRangeError(m_isolate, addExceptionConte xt(message)));
111 } 111 }
112 112
113 void NonThrowableExceptionState::throwDOMException(const ExceptionCode& ec, cons t String& message) 113 void NonThrowableExceptionState::throwDOMException(const ExceptionCode& ec, cons t String& message)
114 { 114 {
115 ASSERT_NOT_REACHED(); 115 ASSERT_NOT_REACHED();
116 m_code = ec; 116 m_code = ec;
117 m_message = message; 117 m_message = message;
118 } 118 }
119 119
120 void NonThrowableExceptionState::throwTypeError(const String& message) 120 void NonThrowableExceptionState::throwTypeError(const String& message)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 processedMessage = ExceptionMessages::failedToDeleteIndexed(interfac eName(), message); 186 processedMessage = ExceptionMessages::failedToDeleteIndexed(interfac eName(), message);
187 else if (m_context == IndexedGetterContext) 187 else if (m_context == IndexedGetterContext)
188 processedMessage = ExceptionMessages::failedToGetIndexed(interfaceNa me(), message); 188 processedMessage = ExceptionMessages::failedToGetIndexed(interfaceNa me(), message);
189 else if (m_context == IndexedSetterContext) 189 else if (m_context == IndexedSetterContext)
190 processedMessage = ExceptionMessages::failedToSetIndexed(interfaceNa me(), message); 190 processedMessage = ExceptionMessages::failedToSetIndexed(interfaceNa me(), message);
191 } 191 }
192 return processedMessage; 192 return processedMessage;
193 } 193 }
194 194
195 } // namespace blink 195 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/V8Binding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698