On Monday, January 28, 2019 at 6:35:30 PM UTC+5:30, Emilio Cobos Álvarez wrote: > There are probably two different issues. > > On 1/28/19 1:51 PM, wrote: > > > > > > Is it possible to add an extra variable to mozilla string(nsTStringRepr). > > > > > > I added a bool variable to nsTStringRepr class in Xpcom/Strings/ > > > > While building the build I got static Assertions like below > > ############################################################ > > /User/Desktop/MOZB/mozilla-central/xpcom/base/nsCycleCollector.cpp:1954:3: > > error: static_assert failed "Don't create too large CCGraphBuilder objects" > > 0:34.99 static_assert(sizeof(CCGraphBuilder) <= 4096, > > If you're just experimenting this assertion can probably just be ignored > / commented out, seems it's just to prevent accidentally wasting a lot > of memory. > > > ################################################################ > > > > > > In normal execution (without adding any variable to core string )size of > > CCGraphBuilder is 4096 > > > > Since it is static_assert I commented that line and proceeded in > > building. > > > > Building was successful. > > > > While running firefox it just popsup and crashes. > > > > I used debbugger to know where it is getting crashed > > It is at > > > > /mozilla-central/servo/components/style/gecko/data.rs > > 75: debug_assert!(!self.inner().mContents.mRawPtr.is_null()); > > > > I guess it is getting crashed because of memory issue. I don't exactly. > > Does anyone know what is the exact problem and help me in modification of > > mozilla string. > > This one probably means that you forgot to also update the rust version > of the string representation in: > > > https://searchfox.org/mozilla-central/rev/4faab2f1b697827b93e16cb798b22b197e5235c9/xpcom/rust/nsstring/src/lib.rs#368 > > And as a result you're corrupting some memory somewhere. I think we have > unit tests that would catch that mistake: > > > https://searchfox.org/mozilla-central/rev/4faab2f1b697827b93e16cb798b22b197e5235c9/xpcom/rust/nsstring/src/lib.rs#1302 > > If you updated both, then I don't know and I'd have to take a look on a > debugger :) > > -- Emilio
Thank you Emilio it worked when I updated the rust string version. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform