Closed Bug 1691453 Opened 3 years ago Closed 3 years ago

No need to check ObservesTypeOfEntry again in PerformanceObserver::QueueEntry

Categories

(Core :: Performance, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
88 Branch
Performance Impact none
Tracking Status
firefox88 --- fixed

People

(Reporter: sefeng, Assigned: murali.venkata4, Mentored)

Details

(Keywords: good-first-bug, Whiteboard: [lang=C++])

Attachments

(1 file)

Hey, Rohan Here !! Will like to get mentored by you for solving this bug as this is my very first contribution !!

Hi Rohan, thanks for your interest. The initial comment should give you an idea of where to start. Let me know if you have questions.

Hello! I would Like to work on this as my first contribution, should the if block be removed in https://searchfox.org/mozilla-central/rev/d537e47349944c0fbd0100bd52c30e493e748c2e/dom/performance/PerformanceObserver.cpp#125-127
?

Flags: needinfo?(sefeng)

Yes, and it should be replaced with MOZ_ASSERT(ObservesTypeOfEntry(aEntry));.

Flags: needinfo?(sefeng)
Assignee: nobody → murali.venkata4
Status: NEW → ASSIGNED

Hi Sean,

Can you please clear some of my questions (Kindly excuse me, if the questions are dumb) -

  1. What is the purpose of MOZ_ASSERT ?
  2. For bugs like these is running mochitests enough ?
  3. And can you please let me know how do i debug locally on my machine.

Thanks

What is the purpose of MOZ_ASSERT ?

MOZ_ASSERT is just an assertion that'll be evaluated only in debug mode. We added a MOZ_ASSERT to ensure our hypothesis is correct such that the caller indeed called ObservesTypeOfEntry.

For bugs like these is running mochitests enough?

Yeah, mochitests are enough. I actually already queued the patch to land because I am confident with it. However, as you pointed out, we should run mochitests first before landing the patch. We'll see how it goes, if it's got backed out, we can investigate.

And can you please let me know how do i debug locally on my machine.

What do you want to debug? Generally, you want to run with a debug build and start a debugger like rr.

Pushed by sefeng@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8401142a1ad2
Remove ObservesTypeOfEntry again in PerformanceObserver::QueueEntry.r=sefeng

What do you want to debug? Generally, you want to run with a debug build and start a debugger like rr.

Like to debug mozilla generally, the address bar, the dom or any such component.

So to debug the address bar, you probably want to use https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox. For DOM, it's mainly like what I said. You want to use a debugger that can debug C++ code.

Stepping through the code using the debugger is generally helpful. However, most of the time you need to know where to start, and this is the tricky part.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Performance Impact: --- → -
Whiteboard: [qf-][lang=C++] → [lang=C++]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: