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

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

Issue 797283005: replace COMPILE_ASSERT with static_assert in bindings/ (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 | Source/bindings/core/v8/ScriptValueSerializer.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) 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 { 345 {
346 if (value.isEmpty()) 346 if (value.isEmpty())
347 return nullptr; 347 return nullptr;
348 ASSERT(value.isObject()); 348 ASSERT(value.isObject());
349 return V8JavaScriptCallFrame::toImpl(v8::Handle<v8::Object>::Cast(value.v8Va lueUnsafe())); 349 return V8JavaScriptCallFrame::toImpl(v8::Handle<v8::Object>::Cast(value.v8Va lueUnsafe()));
350 } 350 }
351 351
352 PassRefPtrWillBeRawPtr<JavaScriptCallFrame> ScriptDebugServer::wrapCallFrames(in t maximumLimit, ScopeInfoDetails scopeDetails) 352 PassRefPtrWillBeRawPtr<JavaScriptCallFrame> ScriptDebugServer::wrapCallFrames(in t maximumLimit, ScopeInfoDetails scopeDetails)
353 { 353 {
354 const int scopeBits = 2; 354 const int scopeBits = 2;
355 COMPILE_ASSERT(NoScopes < (1 << scopeBits), not_enough_bits_to_encode_ScopeI nfoDetails); 355 static_assert(NoScopes < (1 << scopeBits), "there must be enough bits to enc ode ScopeInfoDetails");
356 356
357 ASSERT(maximumLimit >= 0); 357 ASSERT(maximumLimit >= 0);
358 int data = (maximumLimit << scopeBits) | scopeDetails; 358 int data = (maximumLimit << scopeBits) | scopeDetails;
359 v8::Handle<v8::Value> currentCallFrameV8; 359 v8::Handle<v8::Value> currentCallFrameV8;
360 if (m_executionState.IsEmpty()) { 360 if (m_executionState.IsEmpty()) {
361 v8::Handle<v8::Function> currentCallFrameFunction = v8::Local<v8::Functi on>::Cast(m_debuggerScript.newLocal(m_isolate)->Get(v8AtomicString(m_isolate, "c urrentCallFrame"))); 361 v8::Handle<v8::Function> currentCallFrameFunction = v8::Local<v8::Functi on>::Cast(m_debuggerScript.newLocal(m_isolate)->Get(v8AtomicString(m_isolate, "c urrentCallFrame")));
362 currentCallFrameV8 = v8::Debug::Call(currentCallFrameFunction, v8::Integ er::New(m_isolate, data)); 362 currentCallFrameV8 = v8::Debug::Call(currentCallFrameFunction, v8::Integ er::New(m_isolate, data));
363 } else { 363 } else {
364 v8::Handle<v8::Value> argv[] = { m_executionState, v8::Integer::New(m_is olate, data) }; 364 v8::Handle<v8::Value> argv[] = { m_executionState, v8::Integer::New(m_is olate, data) };
365 currentCallFrameV8 = callDebuggerMethod("currentCallFrame", WTF_ARRAY_LE NGTH(argv), argv); 365 currentCallFrameV8 = callDebuggerMethod("currentCallFrame", WTF_ARRAY_LE NGTH(argv), argv);
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 { 743 {
744 return PassOwnPtr<ScriptSourceCode>(); 744 return PassOwnPtr<ScriptSourceCode>();
745 } 745 }
746 746
747 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou rce, const String& url, const String& functionName) 747 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou rce, const String& url, const String& functionName)
748 { 748 {
749 return source; 749 return source;
750 } 750 }
751 751
752 } // namespace blink 752 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptValueSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698