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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp

Issue 1638563002: DevTools: migrate ScriptFunctionCall off ScriptValue (to be inlined into the InjectedScript.cpp). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 return; 487 return;
488 } 488 }
489 489
490 Document* document = toDocument(m_scriptState->executionContext()); 490 Document* document = toDocument(m_scriptState->executionContext());
491 if (!document) 491 if (!document)
492 return; 492 return;
493 // FIXME: There are no tests for this error showing when a recursive 493 // FIXME: There are no tests for this error showing when a recursive
494 // object is inspected. 494 // object is inspected.
495 const String errorMessage("\"Inspection error. Maximum depth reached?\"" ); 495 const String errorMessage("\"Inspection error. Maximum depth reached?\"" );
496 ScriptState* scriptState = m_scriptState.get(); 496 ScriptState* scriptState = m_scriptState.get();
497 v8::Isolate* isolate = scriptState->isolate();
498 ScriptState::Scope scope(scriptState); 497 ScriptState::Scope scope(scriptState);
499 RefPtr<JSONValue> keyJsonValue = toJSONValue(isolate, idbCursor->key(scr iptState).v8Value()); 498 RefPtr<JSONValue> keyJsonValue = toJSONValue(scriptState->context(), idb Cursor->key(scriptState).v8Value());
500 RefPtr<JSONValue> primaryKeyJsonValue = toJSONValue(isolate, idbCursor-> primaryKey(scriptState).v8Value()); 499 RefPtr<JSONValue> primaryKeyJsonValue = toJSONValue(scriptState->context (), idbCursor->primaryKey(scriptState).v8Value());
501 RefPtr<JSONValue> valueJsonValue = toJSONValue(isolate, idbCursor->value (scriptState).v8Value()); 500 RefPtr<JSONValue> valueJsonValue = toJSONValue(scriptState->context(), i dbCursor->value(scriptState).v8Value());
502 String key = keyJsonValue ? keyJsonValue->toJSONString() : errorMessage; 501 String key = keyJsonValue ? keyJsonValue->toJSONString() : errorMessage;
503 String value = valueJsonValue ? valueJsonValue->toJSONString() : errorMe ssage; 502 String value = valueJsonValue ? valueJsonValue->toJSONString() : errorMe ssage;
504 String primaryKey = primaryKeyJsonValue ? primaryKeyJsonValue->toJSONStr ing() : errorMessage; 503 String primaryKey = primaryKeyJsonValue ? primaryKeyJsonValue->toJSONStr ing() : errorMessage;
505 RefPtr<DataEntry> dataEntry = DataEntry::create() 504 RefPtr<DataEntry> dataEntry = DataEntry::create()
506 .setKey(key) 505 .setKey(key)
507 .setPrimaryKey(primaryKey) 506 .setPrimaryKey(primaryKey)
508 .setValue(value); 507 .setValue(value);
509 m_result->addItem(dataEntry); 508 m_result->addItem(dataEntry);
510 } 509 }
511 510
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName ); 834 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName );
836 } 835 }
837 836
838 DEFINE_TRACE(InspectorIndexedDBAgent) 837 DEFINE_TRACE(InspectorIndexedDBAgent)
839 { 838 {
840 visitor->trace(m_inspectedFrames); 839 visitor->trace(m_inspectedFrames);
841 InspectorBaseAgent::trace(visitor); 840 InspectorBaseAgent::trace(visitor);
842 } 841 }
843 842
844 } // namespace blink 843 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698