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

Side by Side Diff: src/bootstrapper.cc

Issue 8332029: Print out line number and extension name when compilation of an extension fails. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/isolate.cc » ('j') | src/isolate.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 20 matching lines...) Expand all
31 #include "api.h" 31 #include "api.h"
32 #include "bootstrapper.h" 32 #include "bootstrapper.h"
33 #include "compiler.h" 33 #include "compiler.h"
34 #include "debug.h" 34 #include "debug.h"
35 #include "execution.h" 35 #include "execution.h"
36 #include "global-handles.h" 36 #include "global-handles.h"
37 #include "isolate-inl.h" 37 #include "isolate-inl.h"
38 #include "macro-assembler.h" 38 #include "macro-assembler.h"
39 #include "natives.h" 39 #include "natives.h"
40 #include "objects-visiting.h" 40 #include "objects-visiting.h"
41 #include "platform.h"
41 #include "snapshot.h" 42 #include "snapshot.h"
42 #include "extensions/externalize-string-extension.h" 43 #include "extensions/externalize-string-extension.h"
43 #include "extensions/gc-extension.h" 44 #include "extensions/gc-extension.h"
44 45
45 namespace v8 { 46 namespace v8 {
46 namespace internal { 47 namespace internal {
47 48
48 49
49 NativesExternalStringResource::NativesExternalStringResource( 50 NativesExternalStringResource::NativesExternalStringResource(
50 Bootstrapper* bootstrapper, 51 Bootstrapper* bootstrapper,
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1999 isolate->factory()->NewExternalStringFromAscii(extension->source()); 2000 isolate->factory()->NewExternalStringFromAscii(extension->source());
2000 bool result = CompileScriptCached( 2001 bool result = CompileScriptCached(
2001 CStrVector(extension->name()), 2002 CStrVector(extension->name()),
2002 source_code, 2003 source_code,
2003 isolate->bootstrapper()->extensions_cache(), 2004 isolate->bootstrapper()->extensions_cache(),
2004 extension, 2005 extension,
2005 Handle<Context>(isolate->context()), 2006 Handle<Context>(isolate->context()),
2006 false); 2007 false);
2007 ASSERT(isolate->has_pending_exception() != result); 2008 ASSERT(isolate->has_pending_exception() != result);
2008 if (!result) { 2009 if (!result) {
2010 // We print out the name of the extension that fail to install.
2011 // When an error is thrown during bootstrapping we automatically print
2012 // the line number at which this happened to the console in the isolate
2013 // error throwing functionality.
2014 OS::PrintError("Error installing extension '%s'.\n",
2015 current->extension()->name());
2009 isolate->clear_pending_exception(); 2016 isolate->clear_pending_exception();
2010 } 2017 }
2011 current->set_state(v8::INSTALLED); 2018 current->set_state(v8::INSTALLED);
2012 return result; 2019 return result;
2013 } 2020 }
2014 2021
2015 2022
2016 bool Genesis::InstallJSBuiltins(Handle<JSBuiltinsObject> builtins) { 2023 bool Genesis::InstallJSBuiltins(Handle<JSBuiltinsObject> builtins) {
2017 HandleScope scope; 2024 HandleScope scope;
2018 Factory* factory = builtins->GetIsolate()->factory(); 2025 Factory* factory = builtins->GetIsolate()->factory();
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
2285 return from + sizeof(NestingCounterType); 2292 return from + sizeof(NestingCounterType);
2286 } 2293 }
2287 2294
2288 2295
2289 // Called when the top-level V8 mutex is destroyed. 2296 // Called when the top-level V8 mutex is destroyed.
2290 void Bootstrapper::FreeThreadResources() { 2297 void Bootstrapper::FreeThreadResources() {
2291 ASSERT(!IsActive()); 2298 ASSERT(!IsActive());
2292 } 2299 }
2293 2300
2294 } } // namespace v8::internal 2301 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/isolate.cc » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698