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

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

Issue 23788005: Remove calls to HandleScope default ctor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: code review (pfeldman) Created 7 years, 3 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/V8EventListenerList.h ('k') | Source/bindings/v8/V8LazyEventListener.cpp » ('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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 DOMWindow* firstWindow = firstDOMWindow(); 88 DOMWindow* firstWindow = firstDOMWindow();
89 if (!firstWindow->isCurrentlyDisplayedInFrame()) 89 if (!firstWindow->isCurrentlyDisplayedInFrame())
90 return; 90 return;
91 91
92 String errorMessage = toWebCoreString(message->Get()); 92 String errorMessage = toWebCoreString(message->Get());
93 93
94 v8::Handle<v8::StackTrace> stackTrace = message->GetStackTrace(); 94 v8::Handle<v8::StackTrace> stackTrace = message->GetStackTrace();
95 RefPtr<ScriptCallStack> callStack; 95 RefPtr<ScriptCallStack> callStack;
96 // Currently stack trace is only collected when inspector is open. 96 // Currently stack trace is only collected when inspector is open.
97 if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0) 97 if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0)
98 callStack = createScriptCallStack(stackTrace, ScriptCallStack::maxCallSt ackSizeToCapture); 98 callStack = createScriptCallStack(stackTrace, ScriptCallStack::maxCallSt ackSizeToCapture, v8::Isolate::GetCurrent());
99 99
100 v8::Handle<v8::Value> resourceName = message->GetScriptResourceName(); 100 v8::Handle<v8::Value> resourceName = message->GetScriptResourceName();
101 bool shouldUseDocumentURL = resourceName.IsEmpty() || !resourceName->IsStrin g(); 101 bool shouldUseDocumentURL = resourceName.IsEmpty() || !resourceName->IsStrin g();
102 String resource = shouldUseDocumentURL ? firstWindow->document()->url() : to WebCoreString(resourceName); 102 String resource = shouldUseDocumentURL ? firstWindow->document()->url() : to WebCoreString(resourceName);
103 AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCr ossOrigin : NotSharableCrossOrigin; 103 AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCr ossOrigin : NotSharableCrossOrigin;
104 104
105 RefPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, resource, messag e->GetLineNumber(), message->GetStartColumn()); 105 RefPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, resource, messag e->GetLineNumber(), message->GetStartColumn());
106 if (V8DOMWrapper::isDOMWrapper(data)) { 106 if (V8DOMWrapper::isDOMWrapper(data)) {
107 v8::Handle<v8::Object> obj = v8::Handle<v8::Object>::Cast(data); 107 v8::Handle<v8::Object> obj = v8::Handle<v8::Object>::Cast(data);
108 WrapperTypeInfo* type = toWrapperTypeInfo(obj); 108 WrapperTypeInfo* type = toWrapperTypeInfo(obj);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 v8::ResourceConstraints resourceConstraints; 212 v8::ResourceConstraints resourceConstraints;
213 uint32_t here; 213 uint32_t here;
214 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*)); 214 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*));
215 v8::SetResourceConstraints(&resourceConstraints); 215 v8::SetResourceConstraints(&resourceConstraints);
216 216
217 V8PerIsolateData::ensureInitialized(isolate); 217 V8PerIsolateData::ensureInitialized(isolate);
218 } 218 }
219 219
220 } // namespace WebCore 220 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8EventListenerList.h ('k') | Source/bindings/v8/V8LazyEventListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698