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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp

Issue 2517113004: Don't use deprecated ScriptOrigin cstor in V8ScriptRunner (Closed)
Patch Set: Created 4 years 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
OLDNEW
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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 ASSERT(!streamer || resource); 465 ASSERT(!streamer || resource);
466 ASSERT(!resource || resource->cacheHandler() == cacheHandler); 466 ASSERT(!resource || resource->cacheHandler() == cacheHandler);
467 467
468 // NOTE: For compatibility with WebCore, ScriptSourceCode's line starts at 468 // NOTE: For compatibility with WebCore, ScriptSourceCode's line starts at
469 // 1, whereas v8 starts at 0. 469 // 1, whereas v8 starts at 0.
470 v8::ScriptOrigin origin( 470 v8::ScriptOrigin origin(
471 v8String(isolate, fileName), 471 v8String(isolate, fileName),
472 v8::Integer::New(isolate, scriptStartPosition.m_line.zeroBasedInt()), 472 v8::Integer::New(isolate, scriptStartPosition.m_line.zeroBasedInt()),
473 v8::Integer::New(isolate, scriptStartPosition.m_column.zeroBasedInt()), 473 v8::Integer::New(isolate, scriptStartPosition.m_column.zeroBasedInt()),
474 v8Boolean(accessControlStatus == SharableCrossOrigin, isolate), 474 v8Boolean(accessControlStatus == SharableCrossOrigin, isolate),
475 v8::Local<v8::Integer>(), v8Boolean(false, isolate), 475 v8::Local<v8::Integer>(), v8String(isolate, sourceMapUrl),
476 v8String(isolate, sourceMapUrl),
477 v8Boolean(accessControlStatus == OpaqueResource, isolate)); 476 v8Boolean(accessControlStatus == OpaqueResource, isolate));
478 477
479 V8CompileHistogram::Cacheability cacheabilityIfNoHandler = 478 V8CompileHistogram::Cacheability cacheabilityIfNoHandler =
480 V8CompileHistogram::Cacheability::Noncacheable; 479 V8CompileHistogram::Cacheability::Noncacheable;
481 if (!cacheHandler && (scriptStartPosition.m_line.zeroBasedInt() == 0) && 480 if (!cacheHandler && (scriptStartPosition.m_line.zeroBasedInt() == 0) &&
482 (scriptStartPosition.m_column.zeroBasedInt() == 0)) 481 (scriptStartPosition.m_column.zeroBasedInt() == 0))
483 cacheabilityIfNoHandler = V8CompileHistogram::Cacheability::InlineScript; 482 cacheabilityIfNoHandler = V8CompileHistogram::Cacheability::InlineScript;
484 483
485 RefPtr<CachedMetadata> codeCache( 484 RefPtr<CachedMetadata> codeCache(
486 cacheHandler 485 cacheHandler
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 v8AtomicString(isolate, "((e) => { throw e; })"), origin) 743 v8AtomicString(isolate, "((e) => { throw e; })"), origin)
745 .ToLocalChecked(); 744 .ToLocalChecked();
746 v8::Local<v8::Function> thrower = runCompiledInternalScript(isolate, script) 745 v8::Local<v8::Function> thrower = runCompiledInternalScript(isolate, script)
747 .ToLocalChecked() 746 .ToLocalChecked()
748 .As<v8::Function>(); 747 .As<v8::Function>();
749 v8::Local<v8::Value> args[] = {exception}; 748 v8::Local<v8::Value> args[] = {exception};
750 callInternalFunction(thrower, thrower, WTF_ARRAY_LENGTH(args), args, isolate); 749 callInternalFunction(thrower, thrower, WTF_ARRAY_LENGTH(args), args, isolate);
751 } 750 }
752 751
753 } // namespace blink 752 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698