Changeset 220860 in webkit
- Timestamp:
- Aug 17, 2017 9:17:19 AM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r220852 r220860 1 2017-08-17 Jacobo Aragunde Pérez <jaragunde@igalia.com> 2 3 [WPE][GTK] Ensure proper casting of data in gvariants 4 https://bugs.webkit.org/show_bug.cgi?id=175667 5 6 Reviewed by Michael Catanzaro. 7 8 g_variant_new requires data to have the correct width for their types, using 9 casting if necessary. Some data of type `unsigned` were being saved to `guint64` 10 types without explicit casting, leading to undefined behavior in some platforms. 11 12 * inspector/remote/glib/RemoteInspectorGlib.cpp: 13 (Inspector::RemoteInspector::listingForInspectionTarget const): 14 (Inspector::RemoteInspector::listingForAutomationTarget const): 15 (Inspector::RemoteInspector::sendMessageToRemote): 16 1 17 2017-08-17 Yusuke Suzuki <utatane.tea@gmail.com> 2 18 -
trunk/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp
r220425 r220860 188 188 189 189 ASSERT(target.type() == RemoteInspectionTarget::Type::Web || target.type() == RemoteInspectionTarget::Type::JavaScript); 190 return g_variant_new("(tsssb)", target.targetIdentifier(), target.type() == RemoteInspectionTarget::Type::Web ? "Web" : "JavaScript", 190 return g_variant_new("(tsssb)", static_cast<guint64>(target.targetIdentifier()), 191 target.type() == RemoteInspectionTarget::Type::Web ? "Web" : "JavaScript", 191 192 target.name().utf8().data(), target.type() == RemoteInspectionTarget::Type::Web ? target.url().utf8().data() : "null", 192 193 target.hasLocalDebugger()); … … 195 196 TargetListing RemoteInspector::listingForAutomationTarget(const RemoteAutomationTarget& target) const 196 197 { 197 return g_variant_new("(tsssb)", target.targetIdentifier(), "Automation", target.name().utf8().data(), "null", target.isPaired()); 198 return g_variant_new("(tsssb)", static_cast<guint64>(target.targetIdentifier()), 199 "Automation", target.name().utf8().data(), "null", target.isPaired()); 198 200 } 199 201 … … 275 277 g_dbus_connection_call(m_dbusConnection.get(), nullptr, 276 278 INSPECTOR_DBUS_OBJECT_PATH, INSPECTOR_DBUS_INTERFACE, "SendMessageToFrontend", 277 g_variant_new("(ts)", targetIdentifier, message.utf8().data()),279 g_variant_new("(ts)", static_cast<guint64>(targetIdentifier), message.utf8().data()), 278 280 nullptr, G_DBUS_CALL_FLAGS_NO_AUTO_START, 279 281 -1, m_cancellable.get(), dbusConnectionCallAsyncReadyCallback, nullptr); -
trunk/Source/WebKit/ChangeLog
r220857 r220860 1 2017-08-17 Jacobo Aragunde Pérez <jaragunde@igalia.com> 2 3 [WPE][GTK] Ensure proper casting of data in gvariants 4 https://bugs.webkit.org/show_bug.cgi?id=175667 5 6 Reviewed by Michael Catanzaro. 7 8 g_variant_builder_add requires data to have the correct width for their types, using 9 casting if necessary. Corrected a call where a single precision float was being put 10 into a double precision parameter without a cast. 11 12 * UIProcess/API/glib/WebKitWebViewSessionState.cpp: 13 (encodeFrameState): 14 1 15 2017-08-17 Don Olmstead <don.olmstead@sony.com> 2 16 -
trunk/Source/WebKit/UIProcess/API/glib/WebKitWebViewSessionState.cpp
r218487 r220860 172 172 g_variant_builder_add(sessionBuilder, "x", frameState.itemSequenceNumber); 173 173 g_variant_builder_add(sessionBuilder, "(ii)", frameState.scrollPosition.x(), frameState.scrollPosition.y()); 174 g_variant_builder_add(sessionBuilder, "d", frameState.pageScaleFactor);174 g_variant_builder_add(sessionBuilder, "d", static_cast<gdouble>(frameState.pageScaleFactor)); 175 175 if (!frameState.httpBody) 176 176 g_variant_builder_add(sessionBuilder, HTTP_BODY_TYPE_STRING_V1, FALSE);
Note: See TracChangeset
for help on using the changeset viewer.