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

Side by Side Diff: src/liveedit.cc

Issue 207613005: No longer OOM on invalid string length. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase + addressed nits Created 6 years, 9 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 | « src/jsregexp.cc ('k') | src/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after
2006 &inactive_threads_checker); 2006 &inactive_threads_checker);
2007 if (inactive_threads_checker.HasBlockedFunctions()) { 2007 if (inactive_threads_checker.HasBlockedFunctions()) {
2008 return result; 2008 return result;
2009 } 2009 }
2010 2010
2011 // Try to drop activations from the current stack. 2011 // Try to drop activations from the current stack.
2012 const char* error_message = 2012 const char* error_message =
2013 DropActivationsInActiveThread(shared_info_array, result, do_drop); 2013 DropActivationsInActiveThread(shared_info_array, result, do_drop);
2014 if (error_message != NULL) { 2014 if (error_message != NULL) {
2015 // Add error message as an array extra element. 2015 // Add error message as an array extra element.
2016 Vector<const char> vector_message(error_message, StrLength(error_message)); 2016 Handle<String> str = isolate->factory()->NewStringFromAscii(
2017 Handle<String> str = isolate->factory()->NewStringFromAscii(vector_message); 2017 CStrVector(error_message));
2018 SetElementSloppy(result, len, str); 2018 SetElementSloppy(result, len, str);
2019 } 2019 }
2020 return result; 2020 return result;
2021 } 2021 }
2022 2022
2023 2023
2024 // Describes a single callframe a target. Not finding this frame 2024 // Describes a single callframe a target. Not finding this frame
2025 // means an error. 2025 // means an error.
2026 class SingleFrameTarget { 2026 class SingleFrameTarget {
2027 public: 2027 public:
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 2127
2128 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { 2128 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) {
2129 return false; 2129 return false;
2130 } 2130 }
2131 2131
2132 #endif // ENABLE_DEBUGGER_SUPPORT 2132 #endif // ENABLE_DEBUGGER_SUPPORT
2133 2133
2134 2134
2135 2135
2136 } } // namespace v8::internal 2136 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/jsregexp.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698