2020-07-02 20:43 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002415NetSurfJavascriptpublic2016-02-16 14:08
ReporterMichael Drake 
Assigned ToJohn-Mark Bell 
PlatformLinuxOSLinuxOS VersionLinux
Product Version3.4 
Target Version3.4Fixed in Version3.4 
Summary0002415: Crash on test/js/dom-body-enumerate.html
DescriptionWe currently segfault on the test/js/dom-body-enumerate.html test.

In the body element binding we use an autogenerated getter for the text attribute:
  getter HTMLBodyElement::text();

This becomes a call to libdom's dom_html_body_element_get_text(). The BODY element on the document has no TEXT attribute set. So libdom returns the NULL string with no error.

The generated binding does not handle NULL strings and explodes when it dereferences the NULL dom_string.

The IDL says:

      [TreatNullAs=EmptyString] attribute DOMString text;

I am not sure if that means libdom should be changed to return an empty string, or if the generated binding should be changed to handle NULL strings.
Steps To Reproduce./nsgtk test/js/dom-body-enumerate.html
TagsNo tags attached.
Fixed in CI build #3333
Reported in CI build #3315
URL of problem pagetest/js/dom-body-enumerate.html
Attached Files


Dave Higton


Dave Higton (developer)

Fixed in CI #3333
Dave Higton


Dave Higton (developer)

The fix: http://git.netsurf-browser.org/nsgenbind.git/commit/?id=d81d30699f57f0ca41b917c854ef6d0875a18129
Vincent Sanders


Vincent Sanders (administrator)

Confirmed fixed in 3.4 release

-Issue History
Date Modified Username Field Change
2016-01-27 17:55 Michael Drake New Issue
2016-01-31 22:52 Dave Higton Note Added: 0001171
2016-01-31 22:56 Dave Higton Note Added: 0001172
2016-01-31 22:56 Dave Higton Assigned To => John-Mark Bell
2016-01-31 22:56 Dave Higton Status new => resolved
2016-01-31 22:56 Dave Higton Resolution open => fixed
2016-01-31 22:57 John-Mark Bell Fixed in CI build # => 3333
2016-01-31 22:57 John-Mark Bell Product Version 4.0 => 3.4
2016-01-31 22:57 John-Mark Bell Fixed in Version => 3.4
2016-01-31 22:57 John-Mark Bell Target Version => 3.4
2016-02-16 14:08 Vincent Sanders Note Added: 0001239
2016-02-16 14:08 Vincent Sanders Status resolved => closed
+Issue History