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

Side by Side Diff: src/bootstrapper.cc

Issue 983603003: Allow passing sourceMapUrl when compiling scripts (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 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
« no previous file with comments | « src/api.cc ('k') | src/compiler.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/extensions/externalize-string-extension.h" 10 #include "src/extensions/externalize-string-extension.h"
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 HandleScope scope(isolate); 1458 HandleScope scope(isolate);
1459 Handle<SharedFunctionInfo> function_info; 1459 Handle<SharedFunctionInfo> function_info;
1460 1460
1461 // If we can't find the function in the cache, we compile a new 1461 // If we can't find the function in the cache, we compile a new
1462 // function and insert it into the cache. 1462 // function and insert it into the cache.
1463 if (cache == NULL || !cache->Lookup(name, &function_info)) { 1463 if (cache == NULL || !cache->Lookup(name, &function_info)) {
1464 DCHECK(source->IsOneByteRepresentation()); 1464 DCHECK(source->IsOneByteRepresentation());
1465 Handle<String> script_name = 1465 Handle<String> script_name =
1466 factory->NewStringFromUtf8(name).ToHandleChecked(); 1466 factory->NewStringFromUtf8(name).ToHandleChecked();
1467 function_info = Compiler::CompileScript( 1467 function_info = Compiler::CompileScript(
1468 source, script_name, 0, 0, false, false, top_context, extension, NULL, 1468 source, script_name, 0, 0, false, false, Handle<Object>(), top_context,
1469 ScriptCompiler::kNoCompileOptions, 1469 extension, NULL, ScriptCompiler::kNoCompileOptions,
1470 use_runtime_context ? NATIVES_CODE : NOT_NATIVES_CODE, false); 1470 use_runtime_context ? NATIVES_CODE : NOT_NATIVES_CODE, false);
1471 if (function_info.is_null()) return false; 1471 if (function_info.is_null()) return false;
1472 if (cache != NULL) cache->Add(name, function_info); 1472 if (cache != NULL) cache->Add(name, function_info);
1473 } 1473 }
1474 1474
1475 // Set up the function context. Conceptually, we should clone the 1475 // Set up the function context. Conceptually, we should clone the
1476 // function before overwriting the context but since we're in a 1476 // function before overwriting the context but since we're in a
1477 // single-threaded environment it is not strictly necessary. 1477 // single-threaded environment it is not strictly necessary.
1478 DCHECK(top_context->IsNativeContext()); 1478 DCHECK(top_context->IsNativeContext());
1479 Handle<Context> context = 1479 Handle<Context> context =
(...skipping 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after
2932 return from + sizeof(NestingCounterType); 2932 return from + sizeof(NestingCounterType);
2933 } 2933 }
2934 2934
2935 2935
2936 // Called when the top-level V8 mutex is destroyed. 2936 // Called when the top-level V8 mutex is destroyed.
2937 void Bootstrapper::FreeThreadResources() { 2937 void Bootstrapper::FreeThreadResources() {
2938 DCHECK(!IsActive()); 2938 DCHECK(!IsActive());
2939 } 2939 }
2940 2940
2941 } } // namespace v8::internal 2941 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698