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

Unified Diff: ppapi/tests/test_websocket.cc

Issue 8872065: Pepper: Var keeps invalid var_id if VarTracker release it and there is another reference (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/tests/test_websocket.cc
diff --git a/ppapi/tests/test_websocket.cc b/ppapi/tests/test_websocket.cc
index 29aca17730f6f41d5cdd2c6070f80d53f8e51912..f27d03ab63d12acd643ac91ecbfc23a6df97e024 100644
--- a/ppapi/tests/test_websocket.cc
+++ b/ppapi/tests/test_websocket.cc
@@ -137,15 +137,18 @@ std::string TestWebSocket::TestUninitializedPropertiesAccess() {
PP_Var close_reason = websocket_interface_->GetCloseReason(ws);
ASSERT_TRUE(AreEqual(close_reason, ""));
+ ReleaseVar(close_reason);
PP_Bool close_was_clean = websocket_interface_->GetCloseWasClean(ws);
ASSERT_EQ(PP_FALSE, close_was_clean);
PP_Var extensions = websocket_interface_->GetExtensions(ws);
ASSERT_TRUE(AreEqual(extensions, ""));
+ ReleaseVar(extensions);
PP_Var protocol = websocket_interface_->GetProtocol(ws);
ASSERT_TRUE(AreEqual(protocol, ""));
+ ReleaseVar(protocol);
PP_WebSocketReadyState_Dev ready_state =
websocket_interface_->GetReadyState(ws);
@@ -153,6 +156,7 @@ std::string TestWebSocket::TestUninitializedPropertiesAccess() {
PP_Var url = websocket_interface_->GetURL(ws);
ASSERT_TRUE(AreEqual(url, ""));
+ ReleaseVar(url);
dmichael (off chromium) 2011/12/09 21:26:05 I agree the ReleaseVar should be here. Are you sur
Takashi Toyoshima 2011/12/10 01:25:52 OK, anyway it could be useful to add ref-count che
PASS();
}
« no previous file with comments | « no previous file | webkit/plugins/ppapi/ppb_websocket_impl.h » ('j') | webkit/plugins/ppapi/ppb_websocket_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698