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

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

Issue 75163003: Remove deprecated v8::External::New calls (blink side) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 Google Inc. All rights reserved. 2 * Copyright (c) 2011 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return; 95 return;
96 96
97 v8::HandleScope scope(m_isolate); 97 v8::HandleScope scope(m_isolate);
98 v8::Local<v8::Context> debuggerContext = v8::Debug::GetDebugContext(); 98 v8::Local<v8::Context> debuggerContext = v8::Debug::GetDebugContext();
99 v8::Context::Scope contextScope(debuggerContext); 99 v8::Context::Scope contextScope(debuggerContext);
100 100
101 v8::Local<v8::Object> debuggerScript = m_debuggerScript.newLocal(m_isolate); 101 v8::Local<v8::Object> debuggerScript = m_debuggerScript.newLocal(m_isolate);
102 if (!m_listenersMap.size()) { 102 if (!m_listenersMap.size()) {
103 ensureDebuggerScriptCompiled(); 103 ensureDebuggerScriptCompiled();
104 ASSERT(!debuggerScript->IsUndefined()); 104 ASSERT(!debuggerScript->IsUndefined());
105 v8::Debug::SetDebugEventListener2(&PageScriptDebugServer::v8DebugEventCa llback, v8::External::New(this)); 105 v8::Debug::SetDebugEventListener2(&PageScriptDebugServer::v8DebugEventCa llback, v8::External::New(m_isolate, this));
106 } 106 }
107 m_listenersMap.set(page, listener); 107 m_listenersMap.set(page, listener);
108 108
109 V8WindowShell* shell = scriptController.existingWindowShell(mainThreadNormal World()); 109 V8WindowShell* shell = scriptController.existingWindowShell(mainThreadNormal World());
110 if (!shell || !shell->isContextInitialized()) 110 if (!shell || !shell->isContextInitialized())
111 return; 111 return;
112 v8::Local<v8::Context> context = shell->context(); 112 v8::Local<v8::Context> context = shell->context();
113 v8::Handle<v8::Function> getScriptsFunction = v8::Local<v8::Function>::Cast( debuggerScript->Get(v8::String::NewSymbol("getScripts"))); 113 v8::Handle<v8::Function> getScriptsFunction = v8::Local<v8::Function>::Cast( debuggerScript->Get(v8::String::NewSymbol("getScripts")));
114 v8::Handle<v8::Value> argv[] = { context->GetEmbedderData(0) }; 114 v8::Handle<v8::Value> argv[] = { context->GetEmbedderData(0) };
115 v8::Handle<v8::Value> value = V8ScriptRunner::callInternalFunction(getScript sFunction, debuggerScript, WTF_ARRAY_LENGTH(argv), argv, m_isolate); 115 v8::Handle<v8::Value> value = V8ScriptRunner::callInternalFunction(getScript sFunction, debuggerScript, WTF_ARRAY_LENGTH(argv), argv, m_isolate);
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 String PageScriptDebugServer::preprocessEventListener(Frame* frame, const String & source, const String& url, const String& functionName) 272 String PageScriptDebugServer::preprocessEventListener(Frame* frame, const String & source, const String& url, const String& functionName)
273 { 273 {
274 if (!canPreprocess(frame)) 274 if (!canPreprocess(frame))
275 return source; 275 return source;
276 276
277 return m_scriptPreprocessor->preprocessSourceCode(source, url, functionName) ; 277 return m_scriptPreprocessor->preprocessSourceCode(source, url, functionName) ;
278 } 278 }
279 279
280 } // namespace WebCore 280 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698