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

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

Issue 774933008: Disable ASan instrumentation of V8Initializer::initializeWorker() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "core/frame/ConsoleTypes.h" 45 #include "core/frame/ConsoleTypes.h"
46 #include "core/frame/LocalDOMWindow.h" 46 #include "core/frame/LocalDOMWindow.h"
47 #include "core/frame/LocalFrame.h" 47 #include "core/frame/LocalFrame.h"
48 #include "core/frame/csp/ContentSecurityPolicy.h" 48 #include "core/frame/csp/ContentSecurityPolicy.h"
49 #include "core/inspector/ConsoleMessage.h" 49 #include "core/inspector/ConsoleMessage.h"
50 #include "core/inspector/ScriptArguments.h" 50 #include "core/inspector/ScriptArguments.h"
51 #include "core/inspector/ScriptCallStack.h" 51 #include "core/inspector/ScriptCallStack.h"
52 #include "platform/EventDispatchForbiddenScope.h" 52 #include "platform/EventDispatchForbiddenScope.h"
53 #include "platform/RuntimeEnabledFeatures.h" 53 #include "platform/RuntimeEnabledFeatures.h"
54 #include "platform/TraceEvent.h" 54 #include "platform/TraceEvent.h"
55 #include "platform/heap/AddressSanitizer.h"
55 #include "platform/scheduler/Scheduler.h" 56 #include "platform/scheduler/Scheduler.h"
56 #include "public/platform/Platform.h" 57 #include "public/platform/Platform.h"
57 #include "wtf/RefPtr.h" 58 #include "wtf/RefPtr.h"
58 #include "wtf/ThreadSpecific.h" 59 #include "wtf/ThreadSpecific.h"
59 #include "wtf/text/WTFString.h" 60 #include "wtf/text/WTFString.h"
60 #include <v8-debug.h> 61 #include <v8-debug.h>
61 62
62 namespace blink { 63 namespace blink {
63 64
64 static Frame* findFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> data, v 8::Isolate* isolate) 65 static Frame* findFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> data, v 8::Isolate* isolate)
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 V8ErrorHandler::storeExceptionOnErrorEventWrapper(isolate, event.get (), data, scriptState->context()->Global()); 494 V8ErrorHandler::storeExceptionOnErrorEventWrapper(isolate, event.get (), data, scriptState->context()->Global());
494 context->reportException(event.release(), scriptId, nullptr, corsSta tus); 495 context->reportException(event.release(), scriptId, nullptr, corsSta tus);
495 } 496 }
496 } 497 }
497 498
498 perIsolateData->setReportingException(false); 499 perIsolateData->setReportingException(false);
499 } 500 }
500 501
501 static const int kWorkerMaxStackSize = 500 * 1024; 502 static const int kWorkerMaxStackSize = 500 * 1024;
502 503
504 // This function uses a local stack variable to determine the isolate's stack li mit. AddressSanitizer may
505 // relocate that local variable to a fake stack, which may lead to problems duri ng JavaScript execution.
506 // Therefore we disable AddressSanitizer for V8Initializer::initializeWorker().
507 NO_SANITIZE_ADDRESS
503 void V8Initializer::initializeWorker(v8::Isolate* isolate) 508 void V8Initializer::initializeWorker(v8::Isolate* isolate)
504 { 509 {
505 initializeV8Common(isolate); 510 initializeV8Common(isolate);
506 511
507 v8::V8::AddMessageListener(messageHandlerInWorker); 512 v8::V8::AddMessageListener(messageHandlerInWorker);
508 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); 513 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker);
509 514
510 uint32_t here; 515 uint32_t here;
511 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi ze / sizeof(uint32_t*))); 516 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi ze / sizeof(uint32_t*)));
512 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); 517 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker);
513 } 518 }
514 519
515 } // namespace blink 520 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698