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

Side by Side Diff: src/factory.cc

Issue 7889046: Add an optional source length field to the Extension constructor. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 3 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/factory.h ('k') | src/heap.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 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 int begin, 227 int begin,
228 int end) { 228 int end) {
229 ASSERT(begin > 0 || end < str->length()); 229 ASSERT(begin > 0 || end < str->length());
230 CALL_HEAP_FUNCTION(isolate(), 230 CALL_HEAP_FUNCTION(isolate(),
231 isolate()->heap()->AllocateSubString(*str, begin, end), 231 isolate()->heap()->AllocateSubString(*str, begin, end),
232 String); 232 String);
233 } 233 }
234 234
235 235
236 Handle<String> Factory::NewExternalStringFromAscii( 236 Handle<String> Factory::NewExternalStringFromAscii(
237 ExternalAsciiString::Resource* resource) { 237 const ExternalAsciiString::Resource* resource) {
238 CALL_HEAP_FUNCTION( 238 CALL_HEAP_FUNCTION(
239 isolate(), 239 isolate(),
240 isolate()->heap()->AllocateExternalStringFromAscii(resource), 240 isolate()->heap()->AllocateExternalStringFromAscii(resource),
241 String); 241 String);
242 } 242 }
243 243
244 244
245 Handle<String> Factory::NewExternalStringFromTwoByte( 245 Handle<String> Factory::NewExternalStringFromTwoByte(
246 ExternalTwoByteString::Resource* resource) { 246 const ExternalTwoByteString::Resource* resource) {
247 CALL_HEAP_FUNCTION( 247 CALL_HEAP_FUNCTION(
248 isolate(), 248 isolate(),
249 isolate()->heap()->AllocateExternalStringFromTwoByte(resource), 249 isolate()->heap()->AllocateExternalStringFromTwoByte(resource),
250 String); 250 String);
251 } 251 }
252 252
253 253
254 Handle<Context> Factory::NewGlobalContext() { 254 Handle<Context> Factory::NewGlobalContext() {
255 CALL_HEAP_FUNCTION( 255 CALL_HEAP_FUNCTION(
256 isolate(), 256 isolate(),
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 Execution::ConfigureInstance(instance, 1281 Execution::ConfigureInstance(instance,
1282 instance_template, 1282 instance_template,
1283 pending_exception); 1283 pending_exception);
1284 } else { 1284 } else {
1285 *pending_exception = false; 1285 *pending_exception = false;
1286 } 1286 }
1287 } 1287 }
1288 1288
1289 1289
1290 } } // namespace v8::internal 1290 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698