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

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

Issue 1113523002: Use Local<> instead of Handle<> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 ASSERT(m_isolate); 70 ASSERT(m_isolate);
71 ASSERT(!m_creationContext.IsEmpty()); 71 ASSERT(!m_creationContext.IsEmpty());
72 m_code = SecurityError; 72 m_code = SecurityError;
73 String finalSanitized = addExceptionContext(sanitizedMessage); 73 String finalSanitized = addExceptionContext(sanitizedMessage);
74 m_message = finalSanitized; 74 m_message = finalSanitized;
75 String finalUnsanitized = addExceptionContext(unsanitizedMessage); 75 String finalUnsanitized = addExceptionContext(unsanitizedMessage);
76 76
77 setException(V8ThrowException::createDOMException(m_isolate, SecurityError, finalSanitized, finalUnsanitized, m_creationContext)); 77 setException(V8ThrowException::createDOMException(m_isolate, SecurityError, finalSanitized, finalUnsanitized, m_creationContext));
78 } 78 }
79 79
80 void ExceptionState::setException(v8::Handle<v8::Value> exception) 80 void ExceptionState::setException(v8::Local<v8::Value> exception)
81 { 81 {
82 // FIXME: Assert that exception is not empty? 82 // FIXME: Assert that exception is not empty?
83 if (exception.IsEmpty()) { 83 if (exception.IsEmpty()) {
84 clearException(); 84 clearException();
85 return; 85 return;
86 } 86 }
87 87
88 m_exception.set(m_isolate, exception); 88 m_exception.set(m_isolate, exception);
89 } 89 }
90 90
(...skipping 95 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 | « Source/bindings/core/v8/ExceptionState.h ('k') | Source/bindings/core/v8/ExceptionStatePlaceholder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698