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

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

Issue 418823002: Add ScriptValue.v8ValueUnsafe() to access the V8 value without cross-context access check. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/ScriptDebugServer.h ('k') | Source/bindings/core/v8/ScriptValue.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) 2010-2011 Google Inc. All rights reserved. 2 * Copyright (c) 2010-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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 { 310 {
311 ASSERT(isPaused()); 311 ASSERT(isPaused());
312 ASSERT(!m_executionState.IsEmpty()); 312 ASSERT(!m_executionState.IsEmpty());
313 v8::Handle<v8::Value> argv[] = { m_executionState }; 313 v8::Handle<v8::Value> argv[] = { m_executionState };
314 v8::Handle<v8::Value> result = callDebuggerMethod("frameCount", WTF_ARRAY_LE NGTH(argv), argv); 314 v8::Handle<v8::Value> result = callDebuggerMethod("frameCount", WTF_ARRAY_LE NGTH(argv), argv);
315 if (result->IsInt32()) 315 if (result->IsInt32())
316 return result->Int32Value(); 316 return result->Int32Value();
317 return 0; 317 return 0;
318 } 318 }
319 319
320 PassRefPtrWillBeRawPtr<JavaScriptCallFrame> ScriptDebugServer::toJavaScriptCallF rame(const ScriptValue& value) 320 PassRefPtrWillBeRawPtr<JavaScriptCallFrame> ScriptDebugServer::toJavaScriptCallF rameUnsafe(const ScriptValue& value)
321 { 321 {
322 if (value.isEmpty()) 322 if (value.isEmpty())
323 return nullptr; 323 return nullptr;
324 ASSERT(value.isObject()); 324 ASSERT(value.isObject());
325 return V8JavaScriptCallFrame::toNative(v8::Handle<v8::Object>::Cast(value.v8 Value())); 325 return V8JavaScriptCallFrame::toNative(v8::Handle<v8::Object>::Cast(value.v8 ValueUnsafe()));
326 } 326 }
327 327
328 PassRefPtrWillBeRawPtr<JavaScriptCallFrame> ScriptDebugServer::wrapCallFrames(in t maximumLimit, ScopeInfoDetails scopeDetails) 328 PassRefPtrWillBeRawPtr<JavaScriptCallFrame> ScriptDebugServer::wrapCallFrames(in t maximumLimit, ScopeInfoDetails scopeDetails)
329 { 329 {
330 const int scopeBits = 2; 330 const int scopeBits = 2;
331 COMPILE_ASSERT(NoScopes < (1 << scopeBits), not_enough_bits_to_encode_ScopeI nfoDetails); 331 COMPILE_ASSERT(NoScopes < (1 << scopeBits), not_enough_bits_to_encode_ScopeI nfoDetails);
332 332
333 ASSERT(maximumLimit >= 0); 333 ASSERT(maximumLimit >= 0);
334 int data = (maximumLimit << scopeBits) | scopeDetails; 334 int data = (maximumLimit << scopeBits) | scopeDetails;
335 v8::Handle<v8::Value> currentCallFrameV8; 335 v8::Handle<v8::Value> currentCallFrameV8;
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 { 674 {
675 return PassOwnPtr<ScriptSourceCode>(); 675 return PassOwnPtr<ScriptSourceCode>();
676 } 676 }
677 677
678 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou rce, const String& url, const String& functionName) 678 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou rce, const String& url, const String& functionName)
679 { 679 {
680 return source; 680 return source;
681 } 681 }
682 682
683 } // namespace blink 683 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/ScriptDebugServer.h ('k') | Source/bindings/core/v8/ScriptValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698