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

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

Issue 761143003: DevTools: remove ScriptPreprocessor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 10 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 | « Source/bindings/core/v8/V8ScriptRunner.h ('k') | Source/bindings/core/v8/v8.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 v8::Local<v8::Value> V8ScriptRunner::callInternalFunction(v8::Handle<v8::Functio n> function, v8::Handle<v8::Value> receiver, int argc, v8::Handle<v8::Value> arg s[], v8::Isolate* isolate) 454 v8::Local<v8::Value> V8ScriptRunner::callInternalFunction(v8::Handle<v8::Functio n> function, v8::Handle<v8::Value> receiver, int argc, v8::Handle<v8::Value> arg s[], v8::Isolate* isolate)
455 { 455 {
456 TRACE_EVENT0("v8", "v8.callFunction"); 456 TRACE_EVENT0("v8", "v8.callFunction");
457 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution"); 457 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution");
458 V8RecursionScope::MicrotaskSuppression recursionScope(isolate); 458 V8RecursionScope::MicrotaskSuppression recursionScope(isolate);
459 v8::Local<v8::Value> result = function->Call(receiver, argc, args); 459 v8::Local<v8::Value> result = function->Call(receiver, argc, args);
460 crashIfV8IsDead(); 460 crashIfV8IsDead();
461 return result; 461 return result;
462 } 462 }
463 463
464 v8::Local<v8::Value> V8ScriptRunner::callAsFunction(v8::Isolate* isolate, v8::Ha ndle<v8::Object> object, v8::Handle<v8::Value> receiver, int argc, v8::Handle<v8 ::Value> args[])
465 {
466 TRACE_EVENT0("v8", "v8.callFunction");
467 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution");
468
469 V8RecursionScope::MicrotaskSuppression recursionScope(isolate);
470 v8::Local<v8::Value> result = object->CallAsFunction(receiver, argc, args);
471 crashIfV8IsDead();
472 return result;
473 }
474
475 v8::Local<v8::Object> V8ScriptRunner::instantiateObject(v8::Isolate* isolate, v8 ::Handle<v8::ObjectTemplate> objectTemplate) 464 v8::Local<v8::Object> V8ScriptRunner::instantiateObject(v8::Isolate* isolate, v8 ::Handle<v8::ObjectTemplate> objectTemplate)
476 { 465 {
477 TRACE_EVENT0("v8", "v8.newInstance"); 466 TRACE_EVENT0("v8", "v8.newInstance");
478 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution"); 467 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution");
479 468
480 V8RecursionScope::MicrotaskSuppression scope(isolate); 469 V8RecursionScope::MicrotaskSuppression scope(isolate);
481 v8::Local<v8::Object> result = objectTemplate->NewInstance(); 470 v8::Local<v8::Object> result = objectTemplate->NewInstance();
482 crashIfV8IsDead(); 471 crashIfV8IsDead();
483 return result; 472 return result;
484 } 473 }
(...skipping 25 matching lines...) Expand all
510 { 499 {
511 return cacheTag(CacheTagParser, resource); 500 return cacheTag(CacheTagParser, resource);
512 } 501 }
513 502
514 unsigned V8ScriptRunner::tagForCodeCache(Resource* resource) 503 unsigned V8ScriptRunner::tagForCodeCache(Resource* resource)
515 { 504 {
516 return cacheTag(CacheTagCode, resource); 505 return cacheTag(CacheTagCode, resource);
517 } 506 }
518 507
519 } // namespace blink 508 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8ScriptRunner.h ('k') | Source/bindings/core/v8/v8.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698