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

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

Issue 1745423002: DevTools: migrate protocol values from RefPtr to OwnPtr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 } 467 }
468 468
469 Document* document = toDocument(m_scriptState->executionContext()); 469 Document* document = toDocument(m_scriptState->executionContext());
470 if (!document) 470 if (!document)
471 return; 471 return;
472 // FIXME: There are no tests for this error showing when a recursive 472 // FIXME: There are no tests for this error showing when a recursive
473 // object is inspected. 473 // object is inspected.
474 const String errorMessage("\"Inspection error. Maximum depth reached?\"" ); 474 const String errorMessage("\"Inspection error. Maximum depth reached?\"" );
475 ScriptState* scriptState = m_scriptState.get(); 475 ScriptState* scriptState = m_scriptState.get();
476 ScriptState::Scope scope(scriptState); 476 ScriptState::Scope scope(scriptState);
477 RefPtr<protocol::Value> keyJsonValue = toProtocolValue(scriptState->cont ext(), idbCursor->key(scriptState).v8Value()); 477 OwnPtr<protocol::Value> keyJsonValue = toProtocolValue(scriptState->cont ext(), idbCursor->key(scriptState).v8Value());
478 RefPtr<protocol::Value> primaryKeyJsonValue = toProtocolValue(scriptStat e->context(), idbCursor->primaryKey(scriptState).v8Value()); 478 OwnPtr<protocol::Value> primaryKeyJsonValue = toProtocolValue(scriptStat e->context(), idbCursor->primaryKey(scriptState).v8Value());
479 RefPtr<protocol::Value> valueJsonValue = toProtocolValue(scriptState->co ntext(), idbCursor->value(scriptState).v8Value()); 479 OwnPtr<protocol::Value> valueJsonValue = toProtocolValue(scriptState->co ntext(), idbCursor->value(scriptState).v8Value());
480 String key = keyJsonValue ? keyJsonValue->toJSONString() : errorMessage; 480 String key = keyJsonValue ? keyJsonValue->toJSONString() : errorMessage;
481 String value = valueJsonValue ? valueJsonValue->toJSONString() : errorMe ssage; 481 String value = valueJsonValue ? valueJsonValue->toJSONString() : errorMe ssage;
482 String primaryKey = primaryKeyJsonValue ? primaryKeyJsonValue->toJSONStr ing() : errorMessage; 482 String primaryKey = primaryKeyJsonValue ? primaryKeyJsonValue->toJSONStr ing() : errorMessage;
483 OwnPtr<DataEntry> dataEntry = DataEntry::create() 483 OwnPtr<DataEntry> dataEntry = DataEntry::create()
484 .setKey(key) 484 .setKey(key)
485 .setPrimaryKey(primaryKey) 485 .setPrimaryKey(primaryKey)
486 .setValue(value).build(); 486 .setValue(value).build();
487 m_result->addItem(dataEntry.release()); 487 m_result->addItem(dataEntry.release());
488 } 488 }
489 489
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName ); 819 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName );
820 } 820 }
821 821
822 DEFINE_TRACE(InspectorIndexedDBAgent) 822 DEFINE_TRACE(InspectorIndexedDBAgent)
823 { 823 {
824 visitor->trace(m_inspectedFrames); 824 visitor->trace(m_inspectedFrames);
825 InspectorBaseAgent::trace(visitor); 825 InspectorBaseAgent::trace(visitor);
826 } 826 }
827 827
828 } // namespace blink 828 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698