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

Side by Side Diff: Source/WebCore/bindings/v8/V8Binding.h

Issue 6368135: Merge 77597 - 2011-02-03 Anton Muhin <antonm@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 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 | « Source/WebCore/ChangeLog ('k') | Source/WebCore/bindings/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) 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 226
227 m_mode = DoNotExternalize; 227 m_mode = DoNotExternalize;
228 v8::TryCatch block; 228 v8::TryCatch block;
229 m_v8Object = m_v8Object->ToString(); 229 m_v8Object = m_v8Object->ToString();
230 // Handle the case where an exception is thrown as part of invoking toString on the object. 230 // Handle the case where an exception is thrown as part of invoking toString on the object.
231 if (block.HasCaught()) { 231 if (block.HasCaught()) {
232 block.ReThrow(); 232 block.ReThrow();
233 return false; 233 return false;
234 } 234 }
235 235
236 // This path is unexpected. However there is hypothesis that it
237 // might be combination of v8 and v8 bindings bugs. For now
238 // just bailout as we'll crash if attempt to convert empty handle in to a string.
239 if (m_v8Object.IsEmpty()) {
240 ASSERT_NOT_REACHED();
241 return false;
242 }
243
236 return true; 244 return true;
237 } 245 }
238 246
239 v8::Local<v8::Value> object() { return m_v8Object; } 247 v8::Local<v8::Value> object() { return m_v8Object; }
240 248
241 void setString(String string) 249 void setString(String string)
242 { 250 {
243 m_string = string; 251 m_string = string;
244 m_v8Object.Clear(); // To signal that String is ready. 252 m_v8Object.Clear(); // To signal that String is ready.
245 } 253 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 setString(String()); 304 setString(String());
297 return true; 305 return true;
298 } 306 }
299 307
300 return V8ParameterBase::prepareBase(); 308 return V8ParameterBase::prepareBase();
301 } 309 }
302 310
303 } // namespace WebCore 311 } // namespace WebCore
304 312
305 #endif // V8Binding_h 313 #endif // V8Binding_h
OLDNEW
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebCore/bindings/v8/V8Binding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698