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

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

Issue 325143002: Oilpan: Prepare moving inspector script related classes to oilpan. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Created 6 years, 6 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/v8/ScriptProfiler.cpp ('k') | Source/core/dom/Document.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 /* 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 95 v8::Isolate* isolate = v8::Isolate::GetCurrent();
96 // If called during context initialization, there will be no entered window. 96 // If called during context initialization, there will be no entered window.
97 DOMWindow* enteredWindow = enteredDOMWindow(isolate); 97 DOMWindow* enteredWindow = enteredDOMWindow(isolate);
98 if (!enteredWindow || !enteredWindow->isCurrentlyDisplayedInFrame()) 98 if (!enteredWindow || !enteredWindow->isCurrentlyDisplayedInFrame())
99 return; 99 return;
100 100
101 String errorMessage = toCoreString(message->Get()); 101 String errorMessage = toCoreString(message->Get());
102 102
103 v8::Handle<v8::StackTrace> stackTrace = message->GetStackTrace(); 103 v8::Handle<v8::StackTrace> stackTrace = message->GetStackTrace();
104 RefPtr<ScriptCallStack> callStack; 104 RefPtrWillBeRawPtr<ScriptCallStack> callStack = nullptr;
105 // Currently stack trace is only collected when inspector is open. 105 // Currently stack trace is only collected when inspector is open.
106 if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0) 106 if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0)
107 callStack = createScriptCallStack(stackTrace, ScriptCallStack::maxCallSt ackSizeToCapture, isolate); 107 callStack = createScriptCallStack(stackTrace, ScriptCallStack::maxCallSt ackSizeToCapture, isolate);
108 108
109 v8::Handle<v8::Value> resourceName = message->GetScriptResourceName(); 109 v8::Handle<v8::Value> resourceName = message->GetScriptResourceName();
110 bool shouldUseDocumentURL = resourceName.IsEmpty() || !resourceName->IsStrin g(); 110 bool shouldUseDocumentURL = resourceName.IsEmpty() || !resourceName->IsStrin g();
111 String resource = shouldUseDocumentURL ? enteredWindow->document()->url() : toCoreString(resourceName.As<v8::String>()); 111 String resource = shouldUseDocumentURL ? enteredWindow->document()->url() : toCoreString(resourceName.As<v8::String>());
112 AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCr ossOrigin : NotSharableCrossOrigin; 112 AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCr ossOrigin : NotSharableCrossOrigin;
113 113
114 ScriptState* scriptState = ScriptState::current(isolate); 114 ScriptState* scriptState = ScriptState::current(isolate);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 v8::V8::AddMessageListener(messageHandlerInWorker); 242 v8::V8::AddMessageListener(messageHandlerInWorker);
243 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); 243 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker);
244 244
245 v8::ResourceConstraints resourceConstraints; 245 v8::ResourceConstraints resourceConstraints;
246 uint32_t here; 246 uint32_t here;
247 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*)); 247 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*));
248 v8::SetResourceConstraints(isolate, &resourceConstraints); 248 v8::SetResourceConstraints(isolate, &resourceConstraints);
249 } 249 }
250 250
251 } // namespace WebCore 251 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/ScriptProfiler.cpp ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698