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

Side by Side Diff: src/debug.cc

Issue 210143002: Revert "No longer OOM on invalid string length." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/contexts.cc ('k') | src/factory.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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 // Bail out if the index is invalid. 747 // Bail out if the index is invalid.
748 if (index == -1) { 748 if (index == -1) {
749 return false; 749 return false;
750 } 750 }
751 751
752 // Find source and name for the requested script. 752 // Find source and name for the requested script.
753 Handle<String> source_code = 753 Handle<String> source_code =
754 isolate->bootstrapper()->NativesSourceLookup(index); 754 isolate->bootstrapper()->NativesSourceLookup(index);
755 Vector<const char> name = Natives::GetScriptName(index); 755 Vector<const char> name = Natives::GetScriptName(index);
756 Handle<String> script_name = factory->NewStringFromAscii(name); 756 Handle<String> script_name = factory->NewStringFromAscii(name);
757 ASSERT(!script_name.is_null());
758 Handle<Context> context = isolate->native_context(); 757 Handle<Context> context = isolate->native_context();
759 758
760 // Compile the script. 759 // Compile the script.
761 Handle<SharedFunctionInfo> function_info; 760 Handle<SharedFunctionInfo> function_info;
762 function_info = Compiler::CompileScript(source_code, 761 function_info = Compiler::CompileScript(source_code,
763 script_name, 0, 0, 762 script_name, 0, 0,
764 false, 763 false,
765 context, 764 context,
766 NULL, NULL, NO_CACHED_DATA, 765 NULL, NULL, NO_CACHED_DATA,
767 NATIVES_CODE); 766 NATIVES_CODE);
(...skipping 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after
2593 2592
2594 Handle<Object> Debugger::MakeJSObject(Vector<const char> constructor_name, 2593 Handle<Object> Debugger::MakeJSObject(Vector<const char> constructor_name,
2595 int argc, 2594 int argc,
2596 Handle<Object> argv[], 2595 Handle<Object> argv[],
2597 bool* caught_exception) { 2596 bool* caught_exception) {
2598 ASSERT(isolate_->context() == *isolate_->debug()->debug_context()); 2597 ASSERT(isolate_->context() == *isolate_->debug()->debug_context());
2599 2598
2600 // Create the execution state object. 2599 // Create the execution state object.
2601 Handle<String> constructor_str = 2600 Handle<String> constructor_str =
2602 isolate_->factory()->InternalizeUtf8String(constructor_name); 2601 isolate_->factory()->InternalizeUtf8String(constructor_name);
2603 ASSERT(!constructor_str.is_null());
2604 Handle<Object> constructor( 2602 Handle<Object> constructor(
2605 isolate_->global_object()->GetPropertyNoExceptionThrown(*constructor_str), 2603 isolate_->global_object()->GetPropertyNoExceptionThrown(*constructor_str),
2606 isolate_); 2604 isolate_);
2607 ASSERT(constructor->IsJSFunction()); 2605 ASSERT(constructor->IsJSFunction());
2608 if (!constructor->IsJSFunction()) { 2606 if (!constructor->IsJSFunction()) {
2609 *caught_exception = true; 2607 *caught_exception = true;
2610 return isolate_->factory()->undefined_value(); 2608 return isolate_->factory()->undefined_value();
2611 } 2609 }
2612 Handle<Object> js_object = Execution::TryCall( 2610 Handle<Object> js_object = Execution::TryCall(
2613 Handle<JSFunction>::cast(constructor), 2611 Handle<JSFunction>::cast(constructor),
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
3811 { 3809 {
3812 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); 3810 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_));
3813 isolate_->debugger()->CallMessageDispatchHandler(); 3811 isolate_->debugger()->CallMessageDispatchHandler();
3814 } 3812 }
3815 } 3813 }
3816 } 3814 }
3817 3815
3818 #endif // ENABLE_DEBUGGER_SUPPORT 3816 #endif // ENABLE_DEBUGGER_SUPPORT
3819 3817
3820 } } // namespace v8::internal 3818 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/contexts.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698