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

Unified Diff: src/bootstrapper.cc

Issue 316173002: Handle "//# sourceURL" comments in the Parser instead of the JS. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: yet another trivial rebase Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 72ca6bfdc53303bf860b7a2c060eda4a8e74bc0b..e4aa71912fa3c1ec9ac62c5ffe6c76217820d490 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1762,7 +1762,7 @@ bool Genesis::InstallNatives() {
native_context()->set_script_function(*script_fun);
Handle<Map> script_map = Handle<Map>(script_fun->initial_map());
- Map::EnsureDescriptorSlack(script_map, 13);
+ Map::EnsureDescriptorSlack(script_map, 14);
PropertyAttributes attribs =
static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY);
@@ -1869,6 +1869,23 @@ bool Genesis::InstallNatives() {
script_map->AppendDescriptor(&d);
}
+ Handle<AccessorInfo> script_source_url =
+ Accessors::ScriptSourceUrlInfo(isolate(), attribs);
+ {
+ CallbacksDescriptor d(Handle<Name>(Name::cast(script_source_url->name())),
+ script_source_url, attribs);
+ script_map->AppendDescriptor(&d);
+ }
+
+ Handle<AccessorInfo> script_source_mapping_url =
+ Accessors::ScriptSourceMappingUrlInfo(isolate(), attribs);
+ {
+ CallbacksDescriptor d(
+ Handle<Name>(Name::cast(script_source_mapping_url->name())),
+ script_source_mapping_url, attribs);
+ script_map->AppendDescriptor(&d);
+ }
+
// Allocate the empty script.
Handle<Script> script = factory()->NewScript(factory()->empty_string());
script->set_type(Smi::FromInt(Script::TYPE_NATIVE));
« no previous file with comments | « src/api.cc ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698