| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 | 326 |
| 327 v8::MaybeLocal<v8::Script> V8ScriptRunner::compileScript(const ScriptSourceCode&
source, v8::Isolate* isolate, AccessControlStatus accessControlStatus, V8CacheO
ptions cacheOptions) | 327 v8::MaybeLocal<v8::Script> V8ScriptRunner::compileScript(const ScriptSourceCode&
source, v8::Isolate* isolate, AccessControlStatus accessControlStatus, V8CacheO
ptions cacheOptions) |
| 328 { | 328 { |
| 329 if (source.source().length() >= v8::String::kMaxLength) { | 329 if (source.source().length() >= v8::String::kMaxLength) { |
| 330 V8ThrowException::throwGeneralError(isolate, "Source file too large."); | 330 V8ThrowException::throwGeneralError(isolate, "Source file too large."); |
| 331 return v8::Local<v8::Script>(); | 331 return v8::Local<v8::Script>(); |
| 332 } | 332 } |
| 333 return compileScript(v8String(isolate, source.source()), source.url(), sourc
e.sourceMapUrl(), source.startPosition(), isolate, source.resource(), source.str
eamer(), source.resource() ? source.resource()->cacheHandler() : nullptr, access
ControlStatus, cacheOptions); | 333 return compileScript(v8String(isolate, source.source()), source.url(), sourc
e.sourceMapUrl(), source.startPosition(), isolate, source.resource(), source.str
eamer(), source.resource() ? source.resource()->cacheHandler() : nullptr, access
ControlStatus, cacheOptions); |
| 334 } | 334 } |
| 335 | 335 |
| 336 v8::MaybeLocal<v8::Script> V8ScriptRunner::compileScript(const String& code, con
st String& fileName, const String& sourceMapUrl, const TextPosition& textPositio
n, v8::Isolate* isolate, CachedMetadataHandler* cacheMetadataHandler, AccessCont
rolStatus accessControlStatus, V8CacheOptions v8CacheOptions) | 336 v8::MaybeLocal<v8::Script> V8ScriptRunner::compileScript(const CompressibleStrin
g& code, const String& fileName, const String& sourceMapUrl, const TextPosition&
textPosition, v8::Isolate* isolate, CachedMetadataHandler* cacheMetadataHandler
, AccessControlStatus accessControlStatus, V8CacheOptions v8CacheOptions) |
| 337 { | 337 { |
| 338 if (code.length() >= v8::String::kMaxLength) { | 338 if (code.length() >= v8::String::kMaxLength) { |
| 339 V8ThrowException::throwGeneralError(isolate, "Source file too large."); | 339 V8ThrowException::throwGeneralError(isolate, "Source file too large."); |
| 340 return v8::Local<v8::Script>(); | 340 return v8::Local<v8::Script>(); |
| 341 } | 341 } |
| 342 return compileScript(v8String(isolate, code), fileName, sourceMapUrl, textPo
sition, isolate, nullptr, nullptr, cacheMetadataHandler, accessControlStatus, v8
CacheOptions); | 342 return compileScript(v8String(isolate, code), fileName, sourceMapUrl, textPo
sition, isolate, nullptr, nullptr, cacheMetadataHandler, accessControlStatus, v8
CacheOptions); |
| 343 } | 343 } |
| 344 | 344 |
| 345 v8::MaybeLocal<v8::Script> V8ScriptRunner::compileScript(v8::Local<v8::String> c
ode, const String& fileName, const String& sourceMapUrl, const TextPosition& scr
iptStartPosition, v8::Isolate* isolate, ScriptResource* resource, ScriptStreamer
* streamer, CachedMetadataHandler* cacheHandler, AccessControlStatus accessContr
olStatus, V8CacheOptions cacheOptions, bool isInternalScript) | 345 v8::MaybeLocal<v8::Script> V8ScriptRunner::compileScript(v8::Local<v8::String> c
ode, const String& fileName, const String& sourceMapUrl, const TextPosition& scr
iptStartPosition, v8::Isolate* isolate, ScriptResource* resource, ScriptStreamer
* streamer, CachedMetadataHandler* cacheHandler, AccessControlStatus accessContr
olStatus, V8CacheOptions cacheOptions, bool isInternalScript) |
| 346 { | 346 { |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 { | 493 { |
| 494 return cacheTag(CacheTagParser, cacheHandler); | 494 return cacheTag(CacheTagParser, cacheHandler); |
| 495 } | 495 } |
| 496 | 496 |
| 497 unsigned V8ScriptRunner::tagForCodeCache(CachedMetadataHandler* cacheHandler) | 497 unsigned V8ScriptRunner::tagForCodeCache(CachedMetadataHandler* cacheHandler) |
| 498 { | 498 { |
| 499 return cacheTag(CacheTagCode, cacheHandler); | 499 return cacheTag(CacheTagCode, cacheHandler); |
| 500 } | 500 } |
| 501 | 501 |
| 502 } // namespace blink | 502 } // namespace blink |
| OLD | NEW |